mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
Fix trim_split_whitespace clippy lint
This commit is contained in:
@@ -40,7 +40,7 @@ pub trait DcKey: Serialize + Deserializable + KeyTrait + Clone {
|
|||||||
/// Create a key from a base64 string.
|
/// Create a key from a base64 string.
|
||||||
fn from_base64(data: &str) -> Result<Self::KeyType> {
|
fn from_base64(data: &str) -> Result<Self::KeyType> {
|
||||||
// strip newlines and other whitespace
|
// strip newlines and other whitespace
|
||||||
let cleaned: String = data.trim().split_whitespace().collect();
|
let cleaned: String = data.split_whitespace().collect();
|
||||||
let bytes = base64::decode(cleaned.as_bytes())?;
|
let bytes = base64::decode(cleaned.as_bytes())?;
|
||||||
Self::from_slice(&bytes)
|
Self::from_slice(&bytes)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user