summaryrefslogtreecommitdiff
path: root/src/sys/reboot.rs
diff options
context:
space:
mode:
authorOssi Herrala <oherrala@iki.fi>2020-05-13 11:15:03 +0300
committerOssi Herrala <oherrala@iki.fi>2020-05-17 11:24:18 +0300
commit71aa2a6e9a51127d5bed8da38a69aa0894a5fa80 (patch)
tree8d8916b22cdfd41ae77c513b3628a648cb6b98a4 /src/sys/reboot.rs
parent2f78ec2bba5bbeac2c666745da1423b8c326f61a (diff)
downloadnix-71aa2a6e9a51127d5bed8da38a69aa0894a5fa80.zip
Replace void crate with Rust standard lib Infallible type
std::convert::Infallible has been available since Rust 1.34 and nix currently targets Rust 1.36 or later so this should not cause problems. Fixes #1238
Diffstat (limited to 'src/sys/reboot.rs')
-rw-r--r--src/sys/reboot.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/reboot.rs b/src/sys/reboot.rs
index bafa8fc1..d18b44d6 100644
--- a/src/sys/reboot.rs
+++ b/src/sys/reboot.rs
@@ -3,7 +3,7 @@
use {Error, Result};
use errno::Errno;
use libc;
-use void::Void;
+use std::convert::Infallible;
use std::mem::drop;
libc_enum! {
@@ -22,7 +22,7 @@ libc_enum! {
}
}
-pub fn reboot(how: RebootMode) -> Result<Void> {
+pub fn reboot(how: RebootMode) -> Result<Infallible> {
unsafe {
libc::reboot(how as libc::c_int)
};