rename Query::group_storage method to Query::query_storage

This commit is contained in:
Niko Matsakis 2019-01-28 05:01:17 -05:00
parent 1002d7e70a
commit 58ba8ac425
3 changed files with 4 additions and 4 deletions

View file

@ -299,7 +299,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream
type GroupStorage = #group_storage<DB>;
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
}

View file

@ -422,7 +422,7 @@ pub trait Query<DB: Database>: Debug + Default + Sized + 'static {
type GroupKey;
/// 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.
fn group_key(key: Self::Key) -> Self::GroupKey;

View file

@ -90,14 +90,14 @@ where
{
fn get_query_table(db: &DB) -> QueryTable<'_, DB, Q> {
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)
}
fn get_query_table_mut(db: &mut DB) -> QueryTableMut<'_, DB, Q> {
let db = &*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)
}