From 7307c4dacd5caf4f0be670854ae3e3f91277ea9b Mon Sep 17 00:00:00 2001 From: Irevoire Date: Wed, 26 Oct 2022 18:54:15 +0200 Subject: [PATCH] fix clippy --- index-scheduler/src/utils.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index-scheduler/src/utils.rs b/index-scheduler/src/utils.rs index b057fee23..8828f102f 100644 --- a/index-scheduler/src/utils.rs +++ b/index-scheduler/src/utils.rs @@ -361,8 +361,8 @@ impl IndexScheduler { _ => panic!(), } } - match details { - Some(details) => match details { + if let Some(details) = details { + match details { Details::IndexSwap { swaps: sw1 } => { if let KindWithContent::IndexSwap { swaps: sw2 } = &kind { assert_eq!(&sw1, sw2); @@ -458,8 +458,7 @@ impl IndexScheduler { matches!(&kind, KindWithContent::DumpCreation { dump_uid: d2, keys: _, instance_uid: _ } if &d1 == d2 ) ); } - }, - None => (), + } } assert!(self.get_status(&rtxn, status).unwrap().contains(uid));