From aa9cb99929ee1893699184ded888b2586455f016 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 21 Sep 2015 14:42:05 +0200 Subject: Add #[inline] attributes --- src/api/x11/xdisplay.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/x11/xdisplay.rs') 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 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), -- cgit v1.2.3