From bcc5daa5e0c5ada29d65f18c63a2c69c7757aa3a Mon Sep 17 00:00:00 2001 From: Avril Date: Tue, 11 Aug 2020 19:08:39 +0100 Subject: [PATCH] stable build --- src/work.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/work.rs b/src/work.rs index ee0ac21..f5f80b6 100644 --- a/src/work.rs +++ b/src/work.rs @@ -149,7 +149,9 @@ where I: IntoIterator, let task = progress.add_task(format!("{:?}", filename.as_ref())); future::join(task, worker).await } else { - (Option::::None, do_work(process.as_ref(), &filename, ()).await) + #[cfg(nightly)] type NoReturn = !; + #[cfg(not(nightly))] type NoReturn = (); + (Option::::None, do_work(process.as_ref(), &filename, ()).await) } } }; @@ -165,7 +167,13 @@ where I: IntoIterator, if #[cfg(feature="progress")] { worker.0.ok().into() } else { - std::marker::PhantomData:: + cfg_if!{ + if #[cfg(nightly)] { + std::marker::PhantomData:: + } else { + std::marker::PhantomData::<()> + } + } } } };