From 6b2b424dc2e30aa26e878b8dadb013b305bcf2aa Mon Sep 17 00:00:00 2001 From: mxsm Date: Thu, 26 Sep 2024 03:58:54 +0000 Subject: [PATCH] =?UTF-8?q?[ISSUE=20#1002]=F0=9F=90=9BFix=20clippy=20check?= =?UTF-8?q?=20error=20on=20ConfigManager=20#1002?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rocketmq-common/src/common/config_manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rocketmq-common/src/common/config_manager.rs b/rocketmq-common/src/common/config_manager.rs index 5cba07e2..6fda47f9 100644 --- a/rocketmq-common/src/common/config_manager.rs +++ b/rocketmq-common/src/common/config_manager.rs @@ -64,7 +64,7 @@ pub trait ConfigManager { /// * `false` if the configuration loading fails. fn load_bak(&self) -> bool { let file_name = self.config_file_path(); - return if let Ok(ref content) = + if let Ok(ref content) = FileUtils::file_to_string(format!("{}{}", file_name, ".bak").as_str()) { if !content.is_empty() { @@ -75,7 +75,7 @@ pub trait ConfigManager { } else { error!("load Config file: {}.bak -----Failed", file_name); false - }; + } } /// Persists the configuration with a topic.