From 25034f8d4d70b4048d7540264fc18461982406aa Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Fri, 3 Jun 2016 16:25:16 -0300 Subject: Add Clippy as dependency. This brings a lot of clean up on the code. --- src/safe_x11/window.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/safe_x11/window.rs') diff --git a/src/safe_x11/window.rs b/src/safe_x11/window.rs index 6d1e54e..eac4dbd 100644 --- a/src/safe_x11/window.rs +++ b/src/safe_x11/window.rs @@ -260,7 +260,7 @@ impl XWindow { .next() { let diff = attrs.width - (*v - attrs.x); if *v - attrs.x > 0 { - let _ = self.resize_to(attrs.width - diff, attrs.height); + self.resize_to(attrs.width - diff, attrs.height); } } } @@ -273,7 +273,7 @@ impl XWindow { .skip_while(|&a| *a <= win_bound) .next() { let new_width = *v - attrs.x; - let _ = self.resize_to(new_width, attrs.height); + self.resize_to(new_width, attrs.height); } } @@ -285,7 +285,7 @@ impl XWindow { .next() { let diff = attrs.height - (*v - attrs.y); if *v - attrs.y > 0 { - let _ = self.resize_to(attrs.width, attrs.height - diff); + self.resize_to(attrs.width, attrs.height - diff); } } } @@ -298,7 +298,7 @@ impl XWindow { .skip_while(|&a| *a <= win_bound) .next() { let new_height = *v - attrs.y; - let _ = self.resize_to(attrs.width, new_height); + self.resize_to(attrs.width, new_height); } } @@ -363,8 +363,8 @@ impl XWindow { let gc = xlib::XCreateGC(self.display, self.inner, 0, ptr::null_mut()); xlib::XSetForeground(self.display, gc, XWhitePixel(self.display, 0)); xlib::XSetBackground(self.display, gc, XBlackPixel(self.display, 0)); - println!("Loading fixed"); - let font: xlib::XFontStruct = ptr::read(xlib::XLoadQueryFont(self.display, CString::new("fixed").unwrap().as_ptr())); + let cstring = CString::new("fixed").unwrap(); + let font: xlib::XFontStruct = ptr::read(xlib::XLoadQueryFont(self.display, cstring.as_ptr())); xlib::XSetFont(self.display, gc, font.fid); xlib::XClearWindow(self.display, self.inner); XDrawString(self.display, self.inner, gc, -- cgit v1.2.3-70-g09d2