mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-15 09:48:53 +00:00
fix(fmt_index): impl for InternedIngredient
This commit is contained in:
parent
af747c1aca
commit
78d7894266
1 changed files with 7 additions and 7 deletions
|
@ -1,11 +1,12 @@
|
|||
use crossbeam::atomic::AtomicCell;
|
||||
use crossbeam::queue::SegQueue;
|
||||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::durability::Durability;
|
||||
use crate::id::AsId;
|
||||
use crate::ingredient::IngredientRequiresReset;
|
||||
use crate::ingredient::{fmt_index, IngredientRequiresReset};
|
||||
use crate::key::DependencyIndex;
|
||||
use crate::runtime::local_state::QueryOrigin;
|
||||
use crate::runtime::Runtime;
|
||||
|
@ -54,6 +55,8 @@ pub struct InternedIngredient<Id: InternedId, Data: InternedData> {
|
|||
/// `&db` reference. This queue itself is not freed until we have an `&mut db` reference,
|
||||
/// guaranteeing that there are no more references to it.
|
||||
deleted_entries: SegQueue<Box<Data>>,
|
||||
|
||||
debug_name: &'static str,
|
||||
}
|
||||
|
||||
impl<Id, Data> InternedIngredient<Id, Data>
|
||||
|
@ -69,6 +72,7 @@ where
|
|||
counter: AtomicCell::default(),
|
||||
reset_at: Revision::start(),
|
||||
deleted_entries: Default::default(),
|
||||
debug_name: "InternedIngredient",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,12 +239,8 @@ where
|
|||
panic!("unexpected call: interned ingredients do not register for salsa struct deletion events");
|
||||
}
|
||||
|
||||
fn fmt_index(
|
||||
&self,
|
||||
_index: Option<crate::Id>,
|
||||
_fmt: &mut std::fmt::Formatter<'_>,
|
||||
) -> std::fmt::Result {
|
||||
todo!()
|
||||
fn fmt_index(&self, index: Option<crate::Id>, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt_index(self.debug_name, index, fmt)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue