mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-14 17:18:20 +00:00
Remove some unnecessary changes
This commit is contained in:
parent
e2ab6c8bfa
commit
3a84a77ebc
4 changed files with 8 additions and 12 deletions
|
@ -373,7 +373,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream
|
|||
/// single input. You can also use it to invoke this query, though
|
||||
/// it's more common to use the trait method on the database
|
||||
/// itself.
|
||||
#trait_vis fn in_db<'me, 'd>(self, db: &'me (#dyn_db + 'd)) -> salsa::QueryTable<'me, Self, (#dyn_db + 'd)>
|
||||
#trait_vis fn in_db(self, db: &#dyn_db) -> salsa::QueryTable<'_, Self>
|
||||
{
|
||||
salsa::plumbing::get_query_table::<#qt>(db)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
use crate::durability::Durability;
|
||||
use crate::plumbing::QueryStorageOps;
|
||||
use crate::Query;
|
||||
use crate::{QueryDb, QueryTable};
|
||||
use crate::QueryTable;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
/// Additional methods on queries that can be used to "peek into"
|
||||
|
@ -49,7 +49,7 @@ impl<K, V> TableEntry<K, V> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'d, Q> DebugQueryTable for QueryTable<'_, Q, <Q as QueryDb<'d>>::DynDb>
|
||||
impl<'d, Q> DebugQueryTable for QueryTable<'_, Q>
|
||||
where
|
||||
Q: Query,
|
||||
Q::Storage: QueryStorageOps<Q>,
|
||||
|
|
|
@ -463,22 +463,21 @@ pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
|
|||
/// Gives access to various less common operations on queries.
|
||||
///
|
||||
/// [the `query` method]: trait.Database.html#method.query
|
||||
pub struct QueryTable<'me, Q, DB>
|
||||
pub struct QueryTable<'me, Q>
|
||||
where
|
||||
Q: Query,
|
||||
DB: ?Sized,
|
||||
{
|
||||
db: &'me DB,
|
||||
db: &'me <Q as QueryDb<'me>>::DynDb,
|
||||
storage: &'me Q::Storage,
|
||||
}
|
||||
|
||||
impl<'me, 'd, Q> QueryTable<'me, Q, <Q as QueryDb<'d>>::DynDb>
|
||||
impl<'me, Q> QueryTable<'me, Q>
|
||||
where
|
||||
Q: Query,
|
||||
Q::Storage: QueryStorageOps<Q>,
|
||||
{
|
||||
/// Constructs a new `QueryTable`.
|
||||
pub fn new(db: &'me <Q as QueryDb<'d>>::DynDb, storage: &'me Q::Storage) -> Self {
|
||||
pub fn new(db: &'me <Q as QueryDb<'me>>::DynDb, storage: &'me Q::Storage) -> Self {
|
||||
Self { db, storage }
|
||||
}
|
||||
|
||||
|
|
|
@ -85,11 +85,8 @@ pub trait QueryFunction: Query {
|
|||
|
||||
/// Create a query table, which has access to the storage for the query
|
||||
/// and offers methods like `get`.
|
||||
pub fn get_query_table<'d, 'me, Q>(
|
||||
db: &'me <Q as QueryDb<'d>>::DynDb,
|
||||
) -> QueryTable<'me, Q, <Q as QueryDb<'d>>::DynDb>
|
||||
pub fn get_query_table<'me, Q>(db: &'me <Q as QueryDb<'me>>::DynDb) -> QueryTable<'me, Q>
|
||||
where
|
||||
'd: 'me,
|
||||
Q: Query + 'me,
|
||||
Q::Storage: QueryStorageOps<Q>,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue