diff --git a/components/salsa-2022/src/function.rs b/components/salsa-2022/src/function.rs index 336ac6e9..e989bd2b 100644 --- a/components/salsa-2022/src/function.rs +++ b/components/salsa-2022/src/function.rs @@ -14,7 +14,7 @@ use crate::{ use self::delete::DeletedEntries; -use super::{ingredient::Ingredient, routes::IngredientIndex, AsId}; +use super::{ingredient::Ingredient, routes::IngredientIndex}; mod accumulated; mod backdate; @@ -147,7 +147,7 @@ where fn database_key_index(&self, k: Id) -> DatabaseKeyIndex { DatabaseKeyIndex { ingredient_index: self.index, - key_index: k.as_id(), + key_index: k, } } diff --git a/components/salsa-2022/src/function/fetch.rs b/components/salsa-2022/src/function/fetch.rs index 55aa0eae..de2e90c9 100644 --- a/components/salsa-2022/src/function/fetch.rs +++ b/components/salsa-2022/src/function/fetch.rs @@ -1,6 +1,6 @@ use arc_swap::Guard; -use crate::{database::AsSalsaDatabase, runtime::StampedValue, storage::HasJarsDyn, AsId, Id}; +use crate::{database::AsSalsaDatabase, runtime::StampedValue, storage::HasJarsDyn, Id}; use super::{Configuration, DynDb, FunctionIngredient}; @@ -19,8 +19,8 @@ where changed_at, } = self.compute_value(db, key); - if let Some(evicted) = self.lru.record_use(key.as_id()) { - self.evict(AsId::from_id(evicted)); + if let Some(evicted) = self.lru.record_use(key) { + self.evict(evicted); } db.runtime().report_tracked_read(