mirror of
https://github.com/bitwarden/browser
synced 2026-02-05 11:13:44 +00:00
Run cargo fmt
This commit is contained in:
@@ -363,8 +363,12 @@ impl PublicKey {
|
||||
pub fn try_from_blob(blob: Vec<u8>) -> Result<Self, anyhow::Error> {
|
||||
// Parse the blob to extract the algorithm
|
||||
let mut bytes = &blob[..];
|
||||
let alg = String::from_utf8_lossy(read_bytes(&mut bytes)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to read algorithm from blob: {e}"))?.as_slice()).to_string();
|
||||
let alg = String::from_utf8_lossy(
|
||||
read_bytes(&mut bytes)
|
||||
.map_err(|e| anyhow::anyhow!("Failed to read algorithm from blob: {e}"))?
|
||||
.as_slice(),
|
||||
)
|
||||
.to_string();
|
||||
Ok(PublicKey { alg, blob })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user