From 9ebc73e6ac4b4b21b5bca0332f641b5eb66276de Mon Sep 17 00:00:00 2001 From: Lawrence Chou Date: Fri, 14 Oct 2022 14:16:10 +0800 Subject: [PATCH] Comply with Clippy rule single-match --- meilisearch-http/src/option.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/src/option.rs b/meilisearch-http/src/option.rs index ddae59c5a..b02b33758 100644 --- a/meilisearch-http/src/option.rs +++ b/meilisearch-http/src/option.rs @@ -287,14 +287,13 @@ impl Opt { config_read_from = Some(config_file_path); } Err(e) => { - match user_specified_config_file_path { + if let Some(path) = user_specified_config_file_path { // If we have an error while reading the file defined by the user. - Some(path) => anyhow::bail!( + anyhow::bail!( "unable to open or read the {:?} configuration file: {}.", path, e, - ), - None => (), + ) } } }