aboutsummaryrefslogtreecommitdiff
path: root/src/safe_x11/window.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-06-03 16:25:16 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-06-03 16:25:16 -0300
commit25034f8d4d70b4048d7540264fc18461982406aa (patch)
treebe189be1386f9e75b964ac7e0914832075cdeb1d /src/safe_x11/window.rs
parentda3fa00ccf4cde76d1d6489c6043d7e56d4f52c5 (diff)
downloaddotwm-25034f8d4d70b4048d7540264fc18461982406aa.tar.gz
Add Clippy as dependency.
This brings a lot of clean up on the code.
Diffstat (limited to 'src/safe_x11/window.rs')
-rw-r--r--src/safe_x11/window.rs12
1 files changed, 6 insertions, 6 deletions
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,