diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-09-23 13:26:42 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-09-23 13:26:42 +0200 |
commit | dc7c15b7d9572e5ad19f92cef101d1ca7d287261 (patch) | |
tree | b16503dbfe2248beeed0f7d82b150e64e6453043 /src/lib.rs | |
parent | 3820d307a3f23828790e8a46a9c46849592104d6 (diff) | |
parent | aa9cb99929ee1893699184ded888b2586455f016 (diff) | |
download | glutin-dc7c15b7d9572e5ad19f92cef101d1ca7d287261.tar.gz glutin-dc7c15b7d9572e5ad19f92cef101d1ca7d287261.zip |
Merge pull request #607 from tomaka/inline
Add #[inline] attributes
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -478,6 +478,7 @@ impl PixelFormatRequirements { } impl Default for PixelFormatRequirements { + #[inline] fn default() -> PixelFormatRequirements { PixelFormatRequirements { multisampling: None, @@ -532,6 +533,7 @@ pub struct WindowAttributes { } impl Default for WindowAttributes { + #[inline] fn default() -> WindowAttributes { WindowAttributes { dimensions: None, @@ -585,6 +587,7 @@ pub struct GlAttributes<S> { impl<S> GlAttributes<S> { /// Turns the `sharing` parameter into another type by calling a closure. + #[inline] pub fn map_sharing<F, T>(self, f: F) -> GlAttributes<T> where F: FnOnce(S) -> T { GlAttributes { sharing: self.sharing.map(f), @@ -598,6 +601,7 @@ impl<S> GlAttributes<S> { } impl<S> Default for GlAttributes<S> { + #[inline] fn default() -> GlAttributes<S> { GlAttributes { sharing: None, |