Skip to content

Commit

Permalink
Eliminate unused lifetime parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Feb 20, 2022
1 parent bd89848 commit f1bb228
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions trustfall_core/src/frontend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions trustfall_core/src/interpreter/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RefCell<impl Adapter<'query, DataToken = DataToken> + 'query>>,
query: &InterpretedQuery,
component: &IRQueryComponent,
Expand Down Expand Up @@ -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<RefCell<impl Adapter<'query, DataToken = DataToken> + 'query>>,
query: &InterpretedQuery,
_component: &IRQueryComponent,
Expand Down Expand Up @@ -1261,7 +1261,7 @@ fn unpack_piggyback_inner<DataToken: Debug + Clone>(
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<RefCell<impl Adapter<'query, DataToken = DataToken> + 'query>>,
query: &InterpretedQuery,
component: &IRQueryComponent,
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl<DataToken: Debug + Clone + PartialEq> PartialEq for DataContext<DataToken>

impl<DataToken: Debug + Clone + PartialEq + Eq> Eq for DataContext<DataToken> {}

impl<'de, DataToken> Serialize for DataContext<DataToken>
impl<DataToken> Serialize for DataContext<DataToken>
where
DataToken: Debug + Clone + Serialize,
for<'d> DataToken: Deserialize<'d>,
Expand Down
1 change: 1 addition & 0 deletions trustfall_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(map_try_insert)]
#![forbid(unsafe_code)]
#![forbid(unused_lifetimes)]

#[macro_use]
extern crate maplit;
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub(crate) struct TestParsedGraphQLQuery {
}

#[allow(dead_code)]
pub(crate) type TestParsedGraphQLQueryResult<'q> = Result<TestParsedGraphQLQuery, ParseError>;
pub(crate) type TestParsedGraphQLQueryResult = Result<TestParsedGraphQLQuery, ParseError>;

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) struct TestIRQuery {
Expand Down

0 comments on commit f1bb228

Please sign in to comment.