From 31afe4fd583f42efba89d368f43921ce0635f339 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Fri, 10 May 2024 17:58:59 +0300 Subject: [PATCH] chore: Trim the added vault name --- src/cli/add_command.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli/add_command.rs b/src/cli/add_command.rs index 2c3a9b3..709cd1a 100644 --- a/src/cli/add_command.rs +++ b/src/cli/add_command.rs @@ -50,6 +50,7 @@ pub struct Add { impl LprsCommand for Add { fn run(mut self, mut vault_manager: Vaults) -> LprsResult<()> { if !self.vault_info.is_empty() { + self.vault_info.name = self.vault_info.name.trim().to_string(); self.vault_info.password = utils::user_password(self.password, "Vault password:")?; self.vault_info.custom_fields = self.custom_fields.into_iter().collect(); vault_manager.add_vault(self.vault_info);