diff options
Diffstat (limited to 'src/sys/reboot.rs')
-rw-r--r-- | src/sys/reboot.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sys/reboot.rs b/src/sys/reboot.rs index be5067a9..46ab68b6 100644 --- a/src/sys/reboot.rs +++ b/src/sys/reboot.rs @@ -1,8 +1,7 @@ //! Reboot/shutdown or enable/disable Ctrl-Alt-Delete. -use crate::{Error, Result}; +use crate::Result; use crate::errno::Errno; -use libc; use std::convert::Infallible; use std::mem::drop; @@ -27,7 +26,7 @@ pub fn reboot(how: RebootMode) -> Result<Infallible> { unsafe { libc::reboot(how as libc::c_int) }; - Err(Error::from(Errno::last())) + Err(Errno::last()) } /// Enable or disable the reboot keystroke (Ctrl-Alt-Delete). |