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 self::delete::DeletedEntries;
use super::{ingredient::Ingredient, routes::IngredientIndex, AsId}; use super::{ingredient::Ingredient, routes::IngredientIndex};
mod accumulated; mod accumulated;
mod backdate; mod backdate;
@ -147,7 +147,7 @@ where
fn database_key_index(&self, k: Id) -> DatabaseKeyIndex { fn database_key_index(&self, k: Id) -> DatabaseKeyIndex {
DatabaseKeyIndex { DatabaseKeyIndex {
ingredient_index: self.index, ingredient_index: self.index,
key_index: k.as_id(), key_index: k,
} }
} }

View file

@ -1,6 +1,6 @@
use arc_swap::Guard; 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}; use super::{Configuration, DynDb, FunctionIngredient};
@ -19,8 +19,8 @@ where
changed_at, changed_at,
} = self.compute_value(db, key); } = self.compute_value(db, key);
if let Some(evicted) = self.lru.record_use(key.as_id()) { if let Some(evicted) = self.lru.record_use(key) {
self.evict(AsId::from_id(evicted)); self.evict(evicted);
} }
db.runtime().report_tracked_read( db.runtime().report_tracked_read(