From 71aa2a6e9a51127d5bed8da38a69aa0894a5fa80 Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Wed, 13 May 2020 11:15:03 +0300 Subject: 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 --- src/sys/reboot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sys/reboot.rs') 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 { +pub fn reboot(how: RebootMode) -> Result { unsafe { libc::reboot(how as libc::c_int) }; -- cgit v1.2.3