diff --git a/src/main.rs b/src/main.rs index 16dca2e..6e9d566 100644 --- a/src/main.rs +++ b/src/main.rs @@ -242,7 +242,7 @@ fn run() -> i32 { .write_all(buf.as_slice()) .expect("Writing to stdout failed"); } else { - match File::create(&Path::new(&path)) { + match File::create(Path::new(&path)) { Ok(mut f) => image .write_to(&mut f, output_format) .expect("Writing to file failed"), diff --git a/src/xwrap.rs b/src/xwrap.rs index 19aa7ea..d39709d 100644 --- a/src/xwrap.rs +++ b/src/xwrap.rs @@ -289,7 +289,7 @@ impl<'a> Iterator for ScreenRectIter<'a> { unsafe { // TODO Handle failure here? - let crtc = xrandr::XRRGetCrtcInfo((*self.dpy).handle, self.res, self.crtcs[self.i]); + let crtc = xrandr::XRRGetCrtcInfo(self.dpy.handle, self.res, self.crtcs[self.i]); let x = (*crtc).x; let y = (*crtc).y; let w = (*crtc).width;