crypto: Fix a clippy warning.

master
Damir Jelić 2020-11-26 14:02:35 +01:00
parent 7ec5a5ad1a
commit 3073883076
1 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ impl PickledSigning {
} }
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub struct PublicSigningKey(Arc<String>); pub struct PublicSigningKey(Arc<str>);
impl PublicSigningKey { impl PublicSigningKey {
pub fn as_str(&self) -> &str { pub fn as_str(&self) -> &str {
@ -328,7 +328,7 @@ impl Signing {
pub fn from_seed(seed: Vec<u8>) -> Self { pub fn from_seed(seed: Vec<u8>) -> Self {
let inner = OlmPkSigning::new(seed.clone()).expect("Unable to create pk signing object"); let inner = OlmPkSigning::new(seed.clone()).expect("Unable to create pk signing object");
let public_key = PublicSigningKey(Arc::new(inner.public_key().to_owned())); let public_key = PublicSigningKey(inner.public_key().into());
Signing { Signing {
inner: Arc::new(Mutex::new(inner)), inner: Arc::new(Mutex::new(inner)),