From 58ba8ac4253890c1e14ffed10db56f94021c029f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 28 Jan 2019 05:01:17 -0500 Subject: [PATCH] rename `Query::group_storage` method to `Query::query_storage` --- components/salsa-macros/src/query_group.rs | 2 +- src/lib.rs | 2 +- src/plumbing.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/salsa-macros/src/query_group.rs b/components/salsa-macros/src/query_group.rs index 52c55b3b..8d8e0baf 100644 --- a/components/salsa-macros/src/query_group.rs +++ b/components/salsa-macros/src/query_group.rs @@ -299,7 +299,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream type GroupStorage = #group_storage; 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 } diff --git a/src/lib.rs b/src/lib.rs index 2877cc95..dab0200f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -422,7 +422,7 @@ pub trait Query: 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; diff --git a/src/plumbing.rs b/src/plumbing.rs index ee759587..01a909a9 100644 --- a/src/plumbing.rs +++ b/src/plumbing.rs @@ -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) }