mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 20:06:37 +00:00
fix:Apply suggestions from clippy 1.88
This commit is contained in:
@@ -472,9 +472,9 @@ impl Drop for NotificationSystem {
|
||||
pub async fn load_config_from_file(path: &str, system: &NotificationSystem) -> Result<(), NotificationError> {
|
||||
let config_data = tokio::fs::read(path)
|
||||
.await
|
||||
.map_err(|e| NotificationError::Configuration(format!("Failed to read config file: {}", e)))?;
|
||||
.map_err(|e| NotificationError::Configuration(format!("Failed to read config file: {e}")))?;
|
||||
|
||||
let config = Config::unmarshal(config_data.as_slice())
|
||||
.map_err(|e| NotificationError::Configuration(format!("Failed to parse config: {}", e)))?;
|
||||
.map_err(|e| NotificationError::Configuration(format!("Failed to parse config: {e}")))?;
|
||||
system.reload_config(config).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user