diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 14:42:05 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-23 13:11:47 +0200 |
commit | aa9cb99929ee1893699184ded888b2586455f016 (patch) | |
tree | b16503dbfe2248beeed0f7d82b150e64e6453043 /src/api/x11/xdisplay.rs | |
parent | 3820d307a3f23828790e8a46a9c46849592104d6 (diff) | |
download | glutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz glutin-aa9cb99929ee1893699184ded888b2586455f016.zip |
Add #[inline] attributes
Diffstat (limited to 'src/api/x11/xdisplay.rs')
-rw-r--r-- | src/api/x11/xdisplay.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/x11/xdisplay.rs b/src/api/x11/xdisplay.rs index 2aa5d95..2b77d9c 100644 --- a/src/api/x11/xdisplay.rs +++ b/src/api/x11/xdisplay.rs @@ -98,6 +98,7 @@ impl XConnection { } impl Drop for XConnection { + #[inline] fn drop(&mut self) { unsafe { (self.xlib.XCloseDisplay)(self.display) }; } @@ -113,12 +114,14 @@ pub enum XNotSupported { } impl From<ffi::OpenError> for XNotSupported { + #[inline] fn from(err: ffi::OpenError) -> XNotSupported { XNotSupported::LibraryOpenError(err) } } impl Error for XNotSupported { + #[inline] fn description(&self) -> &str { match *self { XNotSupported::LibraryOpenError(_) => "Failed to load one of xlib's shared libraries", @@ -126,6 +129,7 @@ impl Error for XNotSupported { } } + #[inline] fn cause(&self) -> Option<&Error> { match *self { XNotSupported::LibraryOpenError(ref err) => Some(err), |