Fix const query with custom database trait

This commit is contained in:
Micha Reiser 2024-08-20 21:47:19 +02:00
parent 4609fd0043
commit 3f93415313
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -190,7 +190,7 @@ macro_rules! setup_tracked_fn {
fn id_to_input<$db_lt>(db: &$db_lt Self::DbView, key: salsa::Id) -> Self::Input<$db_lt> {
$zalsa::macro_if! {
if $needs_interner {
$Configuration::intern_ingredient(db).data(db, key).clone()
$Configuration::intern_ingredient(db).data(db.as_dyn_database(), key).clone()
} else {
$zalsa::FromId::from_id(key)
}

View file

@ -24,6 +24,6 @@ fn execute() {
#[test]
fn execute_custom() {
let mut db = common::LoggerDatabase::new();
let mut db = common::LoggerDatabase::default();
assert_eq!(tracked_custom_db(&db), 44);
}
}