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 <me@prma.dev>
This commit is contained in:
Perma Alesheikh 2024-01-08 21:30:14 +03:30 committed by Clément DOUIN
parent 6173495cb6
commit d2ad386eaa
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

View file

@ -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();