mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
remove unnecessary uses of AsId
This commit is contained in:
parent
d361e8adfb
commit
8d0f8fccbf
2 changed files with 5 additions and 5 deletions
|
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue