aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 14:42:05 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-23 13:11:47 +0200
commitaa9cb99929ee1893699184ded888b2586455f016 (patch)
treeb16503dbfe2248beeed0f7d82b150e64e6453043 /src/lib.rs
parent3820d307a3f23828790e8a46a9c46849592104d6 (diff)
downloadglutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz
glutin-aa9cb99929ee1893699184ded888b2586455f016.zip
Add #[inline] attributes
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0d0e6ef..7d846e2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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,