Skip to content

Commit

Permalink
Keep rustfmt happy
Browse files Browse the repository at this point in the history
  • Loading branch information
haimgel committed Oct 21, 2023
1 parent 52a579c commit 414b1d2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions examples/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ use ddc::Ddc;
use ddc_macos::Monitor;

fn main() {
let monitors = Monitor::enumerate()
.expect("Could not enumerate external monitors");
let monitors = Monitor::enumerate().expect("Could not enumerate external monitors");

if monitors.is_empty() {
println!("No external monitors found");
Expand Down Expand Up @@ -34,4 +33,4 @@ fn main() {
}
}
}
}
}
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
max_width = 120
edition = "2018"
edition = "2021"
use_try_shorthand = true
2 changes: 1 addition & 1 deletion src/iokit/display.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![allow(non_upper_case_globals,unused)]
#![allow(non_upper_case_globals, unused)]

/// Selective translation of IOKit/graphics/IOGraphicsLib.h
use core_foundation::dictionary::CFDictionaryRef;
Expand Down
2 changes: 1 addition & 1 deletion src/iokit/io2c_interface.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(non_camel_case_types,non_upper_case_globals,non_snake_case,unused)]
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case, unused)]

/// Translation of IOKit/i2c/IOI2CInterface.h
extern crate io_kit_sys;
Expand Down
4 changes: 2 additions & 2 deletions src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Monitor {
let display = CGDisplay::new(display_id);
let frame_buffer = Self::get_io_framebuffer_port(display)?;
Some(Self::new(display, frame_buffer))
})
})
.collect();
Ok(monitors)
}
Expand All @@ -107,7 +107,7 @@ impl Monitor {
let serial = self.monitor.serial_number();
match serial {
0 => None,
_ => Some(format!("{}", serial))
_ => Some(format!("{}", serial)),
}
}

Expand Down

0 comments on commit 414b1d2

Please sign in to comment.