Skip to content

Commit

Permalink
Add checked_new to linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dilawar authored and ostrosco committed Jul 13, 2023
1 parent dbcc7f6 commit a66395e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device_state/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl DeviceState {
}

/// Create a new DeviceState. In case of failure, doesn't panic.
pub fn default() -> Option<DeviceState> {
pub fn checked_new() -> Option<DeviceState> {
unsafe {
let display = xlib::XOpenDisplay(ptr::null());
if display.as_ref().is_none() {
Expand Down

0 comments on commit a66395e

Please sign in to comment.