Upgrade to Rust 2021

This commit is contained in:
Michael Vines
2021-11-30 16:47:00 -08:00
parent 098dba607a
commit dd12d90eac
129 changed files with 128 additions and 130 deletions

View File

@ -1,8 +1,6 @@
/// Wrapper for `nice(3)`.
#[cfg(target_os = "linux")]
fn nice(adjustment: i8) -> Result<i8, nix::errno::Errno> {
use std::convert::TryFrom;
unsafe {
*libc::__errno_location() = 0;
let niceness = libc::nice(libc::c_int::from(adjustment));
@ -71,6 +69,7 @@ pub fn is_renice_allowed(adjustment: i8) -> bool {
#[cfg(test)]
mod tests {
#[cfg(target_os = "linux")]
use super::*;
#[cfg(target_os = "linux")]