mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-08 21:35:47 +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::atomic::AtomicCell;
|
||||||
use crossbeam::queue::SegQueue;
|
use crossbeam::queue::SegQueue;
|
||||||
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use crate::durability::Durability;
|
use crate::durability::Durability;
|
||||||
use crate::id::AsId;
|
use crate::id::AsId;
|
||||||
use crate::ingredient::IngredientRequiresReset;
|
use crate::ingredient::{fmt_index, IngredientRequiresReset};
|
||||||
use crate::key::DependencyIndex;
|
use crate::key::DependencyIndex;
|
||||||
use crate::runtime::local_state::QueryOrigin;
|
use crate::runtime::local_state::QueryOrigin;
|
||||||
use crate::runtime::Runtime;
|
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,
|
/// `&db` reference. This queue itself is not freed until we have an `&mut db` reference,
|
||||||
/// guaranteeing that there are no more references to it.
|
/// guaranteeing that there are no more references to it.
|
||||||
deleted_entries: SegQueue<Box<Data>>,
|
deleted_entries: SegQueue<Box<Data>>,
|
||||||
|
|
||||||
|
debug_name: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Id, Data> InternedIngredient<Id, Data>
|
impl<Id, Data> InternedIngredient<Id, Data>
|
||||||
|
@ -69,6 +72,7 @@ where
|
||||||
counter: AtomicCell::default(),
|
counter: AtomicCell::default(),
|
||||||
reset_at: Revision::start(),
|
reset_at: Revision::start(),
|
||||||
deleted_entries: Default::default(),
|
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");
|
panic!("unexpected call: interned ingredients do not register for salsa struct deletion events");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fmt_index(
|
fn fmt_index(&self, index: Option<crate::Id>, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
&self,
|
fmt_index(self.debug_name, index, fmt)
|
||||||
_index: Option<crate::Id>,
|
|
||||||
_fmt: &mut std::fmt::Formatter<'_>,
|
|
||||||
) -> std::fmt::Result {
|
|
||||||
todo!()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue