pull/3605/head
phiresky 1 year ago
parent e6e96a71e6
commit 0f775341a6

@ -120,8 +120,8 @@ pub async fn get_actor_cached(
/// intern urls to reduce memory usage
/// not sure if worth it
pub fn intern_url<'a>(url: impl Into<Cow<'a, Url>>) -> Arc<Url> {
let url: Cow<'a, Url> = url.into();
static INTERNED_URLS: Lazy<DashSet<Arc<Url>>> = Lazy::new(DashSet::new);
let url: Cow<'a, Url> = url.into();
return INTERNED_URLS
.get::<Url>(url.borrow())
.map(|e| e.clone())

Loading…
Cancel
Save