Skip to content

Commit

Permalink
Simplify parse
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Nov 13, 2023
1 parent 7047948 commit b1b344e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bitwarden/src/mobile/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ pub async fn initialize_user_crypto(client: &mut Client, req: InitUserCryptoRequ
});
client.set_login_method(login_method);

let private_key = req.private_key.parse::<EncString>()?;
let private_key: EncString = req.private_key.parse()?;

match req.method {
InitUserCryptoMethod::Password { password, user_key } => {
let user_key: EncString = user_key.parse::<EncString>()?;
let user_key: EncString = user_key.parse()?;
client.initialize_user_crypto(&password, user_key, private_key)?;
}
}
Expand Down

0 comments on commit b1b344e

Please sign in to comment.