mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-12 16:35:21 +00:00
rename fns to group_foo
This commit is contained in:
parent
c0978fede8
commit
6451c820b7
3 changed files with 7 additions and 7 deletions
|
@ -243,11 +243,11 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream
|
|||
type GroupStorage = #group_storage<DB>;
|
||||
type GroupDescriptor = #group_descriptor;
|
||||
|
||||
fn storage(group_storage: &Self::GroupStorage) -> &Self::Storage {
|
||||
fn group_storage(group_storage: &Self::GroupStorage) -> &Self::Storage {
|
||||
&group_storage.#fn_name
|
||||
}
|
||||
|
||||
fn descriptor(key: Self::Key) -> Self::GroupDescriptor {
|
||||
fn group_descriptor(key: Self::Key) -> Self::GroupDescriptor {
|
||||
#group_descriptor::#fn_name(key)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,10 +356,10 @@ pub trait Query<DB: Database>: Debug + Default + Sized + 'static {
|
|||
type GroupDescriptor;
|
||||
|
||||
/// Extact storage for this query from the storage for its group.
|
||||
fn storage(group_storage: &Self::GroupStorage) -> &Self::Storage;
|
||||
fn group_storage(group_storage: &Self::GroupStorage) -> &Self::Storage;
|
||||
|
||||
/// Create group descriptor for this query.
|
||||
fn descriptor(key: Self::Key) -> Self::GroupDescriptor;
|
||||
fn group_descriptor(key: Self::Key) -> Self::GroupDescriptor;
|
||||
}
|
||||
|
||||
/// Return value from [the `query` method] on `Database`.
|
||||
|
|
|
@ -90,14 +90,14 @@ where
|
|||
{
|
||||
fn get_query_table(db: &DB) -> QueryTable<'_, DB, Q> {
|
||||
let group_storage: &Q::GroupStorage = GetQueryGroupStorage::from(db);
|
||||
let query_storage = Q::storage(group_storage);
|
||||
let query_storage = Q::group_storage(group_storage);
|
||||
QueryTable::new(db, query_storage)
|
||||
}
|
||||
|
||||
fn get_query_table_mut(db: &mut DB) -> QueryTableMut<'_, DB, Q> {
|
||||
let db = &*db;
|
||||
let group_storage: &Q::GroupStorage = GetQueryGroupStorage::from(db);
|
||||
let query_storage = Q::storage(group_storage);
|
||||
let query_storage = Q::group_storage(group_storage);
|
||||
QueryTableMut::new(db, query_storage)
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ where
|
|||
_db: &DB,
|
||||
key: <Q as Query<DB>>::Key,
|
||||
) -> <DB as DatabaseStorageTypes>::QueryDescriptor {
|
||||
let group_descriptor = Q::descriptor(key);
|
||||
let group_descriptor = Q::group_descriptor(key);
|
||||
<DB as GetDatabaseDescriptor<_>>::from(group_descriptor)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue