Skip to content

Commit

Permalink
Fix more clippy warnings found by CI
Browse files Browse the repository at this point in the history
mfw ubuntu has a newer rust than me
  • Loading branch information
9ary committed May 16, 2023
1 parent e3a1585 commit 15df71a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion src/xwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15df71a

Please sign in to comment.