From 3f48cdb3805a3ce2329d6265343a74676a2edcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 19 Jan 2021 11:36:26 +0100 Subject: [PATCH] clippy: don't pass along unit value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make it explicit. this whole section should probably be re-written with select! Signed-off-by: Fabian Grünbichler --- src/api2/reader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api2/reader.rs b/src/api2/reader.rs index 72b6e33a..9bdccfc9 100644 --- a/src/api2/reader.rs +++ b/src/api2/reader.rs @@ -150,16 +150,16 @@ fn upgrade_to_backup_reader_protocol( } }); let abort_future = abort_future - .map(|_| Err(format_err!("task aborted"))); + .map(|_| -> Result<(), anyhow::Error> { Err(format_err!("task aborted")) }); use futures::future::Either; futures::future::select(req_fut, abort_future) .map(move |res| { let _guard = _guard; match res { - Either::Left((Ok(res), _)) => Ok(res), + Either::Left((Ok(_), _)) => Ok(()), Either::Left((Err(err), _)) => Err(err), - Either::Right((Ok(res), _)) => Ok(res), + Either::Right((Ok(_), _)) => Ok(()), Either::Right((Err(err), _)) => Err(err), } })