summaryrefslogtreecommitdiff
path: root/src/sys/reboot.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-18 21:07:00 -0600
committerAlan Somers <asomers@gmail.com>2021-09-19 07:58:15 -0600
commita09b1c8ac643d448db479a108ac6726307075453 (patch)
tree654a84d639d1feca971396f958f7589fc1fb81bf /src/sys/reboot.rs
parentf0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff)
downloadnix-a09b1c8ac643d448db479a108ac6726307075453.zip
Clippy cleanup
And this time, start running Clippy in CI
Diffstat (limited to 'src/sys/reboot.rs')
-rw-r--r--src/sys/reboot.rs5
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).