From d2ad386eaaf5b46971fe417ba6ba6bd1e19b47f5 Mon Sep 17 00:00:00 2001 From: Perma Alesheikh Date: Mon, 8 Jan 2024 21:30:14 +0330 Subject: [PATCH] use as as_deref instead of as_ref and mapping on str Reasons: - Make the code more direct and concise. Signed-off-by: Perma Alesheikh --- src/account/command/sync.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/account/command/sync.rs b/src/account/command/sync.rs index 3acc361..fc5d5d0 100644 --- a/src/account/command/sync.rs +++ b/src/account/command/sync.rs @@ -95,7 +95,7 @@ impl AccountSyncCommand { None }; - let account = self.account.name.as_ref().map(String::as_str); + let account = self.account.name.as_deref(); let (toml_account_config, account_config) = config.clone().into_account_configs(account, true)?; let account_name = account_config.name.as_str();