remove unnecessary uses of AsId

This commit is contained in:
Niko Matsakis 2024-05-17 06:19:32 -04:00
parent d361e8adfb
commit 8d0f8fccbf
2 changed files with 5 additions and 5 deletions

View file

@ -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,
}
}

View file

@ -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(