mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-13 00:40:22 +00:00
rename Query::group_storage
method to Query::query_storage
This commit is contained in:
parent
1002d7e70a
commit
58ba8ac425
3 changed files with 4 additions and 4 deletions
|
@ -299,7 +299,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream
|
||||||
type GroupStorage = #group_storage<DB>;
|
type GroupStorage = #group_storage<DB>;
|
||||||
type GroupKey = #group_key;
|
type GroupKey = #group_key;
|
||||||
|
|
||||||
fn group_storage(group_storage: &Self::GroupStorage) -> &Self::Storage {
|
fn query_storage(group_storage: &Self::GroupStorage) -> &Self::Storage {
|
||||||
&group_storage.#fn_name
|
&group_storage.#fn_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@ pub trait Query<DB: Database>: Debug + Default + Sized + 'static {
|
||||||
type GroupKey;
|
type GroupKey;
|
||||||
|
|
||||||
/// Extact storage for this query from the storage for its group.
|
/// Extact storage for this query from the storage for its group.
|
||||||
fn group_storage(group_storage: &Self::GroupStorage) -> &Self::Storage;
|
fn query_storage(group_storage: &Self::GroupStorage) -> &Self::Storage;
|
||||||
|
|
||||||
/// Create group key for this query.
|
/// Create group key for this query.
|
||||||
fn group_key(key: Self::Key) -> Self::GroupKey;
|
fn group_key(key: Self::Key) -> Self::GroupKey;
|
||||||
|
|
|
@ -90,14 +90,14 @@ where
|
||||||
{
|
{
|
||||||
fn get_query_table(db: &DB) -> QueryTable<'_, DB, Q> {
|
fn get_query_table(db: &DB) -> QueryTable<'_, DB, Q> {
|
||||||
let group_storage: &Q::GroupStorage = HasQueryGroup::group_storage(db);
|
let group_storage: &Q::GroupStorage = HasQueryGroup::group_storage(db);
|
||||||
let query_storage = Q::group_storage(group_storage);
|
let query_storage = Q::query_storage(group_storage);
|
||||||
QueryTable::new(db, query_storage)
|
QueryTable::new(db, query_storage)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_query_table_mut(db: &mut DB) -> QueryTableMut<'_, DB, Q> {
|
fn get_query_table_mut(db: &mut DB) -> QueryTableMut<'_, DB, Q> {
|
||||||
let db = &*db;
|
let db = &*db;
|
||||||
let group_storage: &Q::GroupStorage = HasQueryGroup::group_storage(db);
|
let group_storage: &Q::GroupStorage = HasQueryGroup::group_storage(db);
|
||||||
let query_storage = Q::group_storage(group_storage);
|
let query_storage = Q::query_storage(group_storage);
|
||||||
QueryTableMut::new(db, query_storage)
|
QueryTableMut::new(db, query_storage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue