Skip to content

Commit e438fc5

Browse files
committed
Use ? instead of try macro
1 parent 727837f commit e438fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core-graphics/src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl CGDisplay {
434434
/// Provides a list of displays that are active (or drawable).
435435
#[inline]
436436
pub fn active_displays() -> Result<Vec<CGDirectDisplayID>, CGError> {
437-
let count = try!(CGDisplay::active_display_count());
437+
let count = CGDisplay::active_display_count()?;
438438
let mut buf: Vec<CGDirectDisplayID> = vec![0; count as usize];
439439
let result =
440440
unsafe { CGGetActiveDisplayList(count as u32, buf.as_mut_ptr(), ptr::null_mut()) };

0 commit comments

Comments
 (0)