diff --git a/build.rs b/build.rs index 6399463..15d080f 100644 --- a/build.rs +++ b/build.rs @@ -6,6 +6,9 @@ fn main() { // Assert we haven't travelled back in time assert!(version().unwrap().major >= 1); + println!("cargo::rustc-check-cfg=cfg(nightly)"); + println!("cargo::rustc-check-cfg=cfg(stable)"); + // Set cfg flags depending on release channel match version_meta().unwrap().channel { Channel::Stable => { diff --git a/src/arg.rs b/src/arg.rs index 975e860..3384651 100644 --- a/src/arg.rs +++ b/src/arg.rs @@ -225,8 +225,8 @@ impl std::fmt::Display for Error #[cfg(nightly)] return match _v { IntErrorKind::Empty => write!(f, ": argument empty"), IntErrorKind::InvalidDigit => write!(f, ": invalid digit"), - IntErrorKind::Overflow => write!(f, ": conversion would result in overflow"), - IntErrorKind::Underflow => write!(f, ": conversion would result in underflow"), + IntErrorKind::PosOverflow => write!(f, ": conversion would result in overflow"), + IntErrorKind::NegOverflow => write!(f, ": conversion would result in underflow"), IntErrorKind::Zero => write!(f, ": found zero"), _=> Ok(()), }; diff --git a/src/dir.rs b/src/dir.rs index 0ed309a..663ac95 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -76,7 +76,7 @@ async fn _walk+Send+Sync>(path: P, depth: usize, recurse: Option< let child = tokio::spawn(async move { (__walk(&dir, depth+1, recurse, sem, output).await, dir) }.boxed()); - task::yield_now().await; + let _ = task::yield_now().await; child }); } diff --git a/src/main.rs b/src/main.rs index f3e42ea..4a8d5c3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,4 @@ -#![cfg_attr(nightly, feature(int_error_matching))] #![cfg_attr(nightly, feature(linked_list_remove))] -#![cfg_attr(nightly, feature(const_fn))] #![cfg_attr(nightly, feature(never_type))] diff --git a/src/process.rs b/src/process.rs index d648ffe..9b74a3c 100644 --- a/src/process.rs +++ b/src/process.rs @@ -106,7 +106,7 @@ where U: IntoIterator, } } }); - task::yield_now().await; + let _ = task::yield_now().await; match child.await { Ok(exit) => { if exit.success() { diff --git a/src/work.rs b/src/work.rs index f3f53a5..2a0751d 100644 --- a/src/work.rs +++ b/src/work.rs @@ -89,7 +89,7 @@ async fn do_work(process: impl AsRef, file: impl AsRef, mut prog stack }) }; - tokio::task::yield_now().await; + let _ = tokio::task::yield_now().await; //let _ = opt_await.await; match process::contained_spawn(process, std::iter::once(file), tx).await { Ok(_) => Ok(collector.await.expect("Child panic").into_iter()),