From 578768d7df25ce96d8ff2a16adce04f2990ab105 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Wed, 6 Jan 2021 23:43:23 +0900 Subject: [PATCH] Remove unnecessary attribute to suppress clippy --- plume-models/src/search/searcher.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plume-models/src/search/searcher.rs b/plume-models/src/search/searcher.rs index 61608bea..7ea01c59 100644 --- a/plume-models/src/search/searcher.rs +++ b/plume-models/src/search/searcher.rs @@ -90,8 +90,8 @@ impl Searcher { } open_searcher = Self::open(path, tokenizers); } - #[allow(clippy::match_wild_err_arm)] let searcher = match open_searcher { + Ok(s) => s, Err(Error::Search(e)) => match e { SearcherError::WriteLockAcquisitionError => panic!( r#" @@ -117,8 +117,7 @@ Then try to restart Plume ), e => Err(e).unwrap(), }, - Err(_) => panic!("Unexpected error while opening search index"), - Ok(s) => s, + _ => panic!("Unexpected error while opening search index"), }; searcher