From c48aead00ea23e911501c92a0fedc6626b444409 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 1 Dec 2021 19:51:38 +0100 Subject: [PATCH] identifiers: Replace qualified paths with imports --- crates/ruma-identifiers/src/key_id.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/ruma-identifiers/src/key_id.rs b/crates/ruma-identifiers/src/key_id.rs index bb5a3488..4593716e 100644 --- a/crates/ruma-identifiers/src/key_id.rs +++ b/crates/ruma-identifiers/src/key_id.rs @@ -4,7 +4,9 @@ use std::{ fmt, hash::{Hash, Hasher}, marker::PhantomData, + rc::Rc, str::FromStr, + sync::Arc, }; use crate::{crypto_algorithms::SigningKeyAlgorithm, DeviceId, KeyName}; @@ -108,17 +110,17 @@ impl AsRef for Box> { } } -impl From<&KeyId> for std::rc::Rc> { - fn from(s: &KeyId) -> std::rc::Rc> { - let rc = std::rc::Rc::::from(s.as_str()); - unsafe { std::rc::Rc::from_raw(std::rc::Rc::into_raw(rc) as *const KeyId) } +impl From<&KeyId> for Rc> { + fn from(s: &KeyId) -> Rc> { + let rc = Rc::::from(s.as_str()); + unsafe { Rc::from_raw(Rc::into_raw(rc) as *const KeyId) } } } -impl From<&KeyId> for std::sync::Arc> { - fn from(s: &KeyId) -> std::sync::Arc> { - let arc = std::sync::Arc::::from(s.as_str()); - unsafe { std::sync::Arc::from_raw(std::sync::Arc::into_raw(arc) as *const KeyId) } +impl From<&KeyId> for Arc> { + fn from(s: &KeyId) -> Arc> { + let arc = Arc::::from(s.as_str()); + unsafe { Arc::from_raw(Arc::into_raw(arc) as *const KeyId) } } }