From f1bb228198bb24edc1798cd3dd0907cc73f0d30e Mon Sep 17 00:00:00 2001 From: Predrag Gruevski Date: Sat, 19 Feb 2022 23:49:00 -0500 Subject: [PATCH] Eliminate unused lifetime parameters. --- trustfall_core/src/frontend/mod.rs | 4 ++-- trustfall_core/src/interpreter/execution.rs | 6 +++--- trustfall_core/src/interpreter/mod.rs | 2 +- trustfall_core/src/lib.rs | 1 + trustfall_core/src/util.rs | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/trustfall_core/src/frontend/mod.rs b/trustfall_core/src/frontend/mod.rs index 2812bf6d..596bf0f3 100644 --- a/trustfall_core/src/frontend/mod.rs +++ b/trustfall_core/src/frontend/mod.rs @@ -470,7 +470,7 @@ fn fill_in_query_variables( } #[allow(clippy::too_many_arguments)] -fn make_query_component<'a, 'schema, 'query, V, E>( +fn make_query_component<'schema, 'query, V, E>( schema: &'schema Schema, query: &'query Query, vid_maker: &mut V, @@ -1113,7 +1113,7 @@ where } #[allow(clippy::too_many_arguments)] -fn make_fold<'a, 'schema, 'query, V, E>( +fn make_fold<'schema, 'query, V, E>( schema: &'schema Schema, query: &'query Query, vid_maker: &mut V, diff --git a/trustfall_core/src/interpreter/execution.rs b/trustfall_core/src/interpreter/execution.rs index 0c43c4cd..fe6ab27b 100644 --- a/trustfall_core/src/interpreter/execution.rs +++ b/trustfall_core/src/interpreter/execution.rs @@ -994,7 +994,7 @@ fn expand_edge<'query, DataToken: Clone + Debug + 'query>( } #[allow(clippy::too_many_arguments)] -fn expand_non_recursive_edge<'schema, 'query, DataToken: Clone + Debug + 'query>( +fn expand_non_recursive_edge<'query, DataToken: Clone + Debug + 'query>( adapter: Rc + 'query>>, query: &InterpretedQuery, component: &IRQueryComponent, @@ -1133,7 +1133,7 @@ fn expand_recursive_edge<'query, DataToken: Clone + Debug + 'query>( } #[allow(clippy::too_many_arguments)] -fn perform_one_recursive_edge_expansion<'schema, 'query, DataToken: Clone + Debug + 'query>( +fn perform_one_recursive_edge_expansion<'query, DataToken: Clone + Debug + 'query>( adapter: Rc + 'query>>, query: &InterpretedQuery, _component: &IRQueryComponent, @@ -1261,7 +1261,7 @@ fn unpack_piggyback_inner( output.push(context); } -fn post_process_recursive_expansion<'schema, 'query, DataToken: Clone + Debug + 'query>( +fn post_process_recursive_expansion<'query, DataToken: Clone + Debug + 'query>( adapter: Rc + 'query>>, query: &InterpretedQuery, component: &IRQueryComponent, diff --git a/trustfall_core/src/interpreter/mod.rs b/trustfall_core/src/interpreter/mod.rs index daef52a3..de3586be 100644 --- a/trustfall_core/src/interpreter/mod.rs +++ b/trustfall_core/src/interpreter/mod.rs @@ -232,7 +232,7 @@ impl PartialEq for DataContext impl Eq for DataContext {} -impl<'de, DataToken> Serialize for DataContext +impl Serialize for DataContext where DataToken: Debug + Clone + Serialize, for<'d> DataToken: Deserialize<'d>, diff --git a/trustfall_core/src/lib.rs b/trustfall_core/src/lib.rs index 37ef9f2e..ce850697 100644 --- a/trustfall_core/src/lib.rs +++ b/trustfall_core/src/lib.rs @@ -1,5 +1,6 @@ #![feature(map_try_insert)] #![forbid(unsafe_code)] +#![forbid(unused_lifetimes)] #[macro_use] extern crate maplit; diff --git a/trustfall_core/src/util.rs b/trustfall_core/src/util.rs index f9114ec4..36c12826 100644 --- a/trustfall_core/src/util.rs +++ b/trustfall_core/src/util.rs @@ -104,7 +104,7 @@ pub(crate) struct TestParsedGraphQLQuery { } #[allow(dead_code)] -pub(crate) type TestParsedGraphQLQueryResult<'q> = Result; +pub(crate) type TestParsedGraphQLQueryResult = Result; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub(crate) struct TestIRQuery {