From 869505bf24d092e62057f973edec52ab66074d72 Mon Sep 17 00:00:00 2001 From: Calin Gavriliuc <13826789+alisenai@users.noreply.github.com> Date: Thu, 7 Apr 2022 17:55:32 -0700 Subject: [PATCH] Clippy check fixes --- src/http/mod.rs | 4 ++-- src/look_ahead.rs | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/http/mod.rs b/src/http/mod.rs index c97e02bf..2fddf6e9 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -91,8 +91,8 @@ pub async fn receive_batch_json(body: impl AsyncRead) -> Result(&data) - .map_err(|e| ParseRequestError::InvalidRequest(Box::new(e)))?) + serde_json::from_slice::(&data) + .map_err(|e| ParseRequestError::InvalidRequest(Box::new(e))) } /// Receive a GraphQL request from a body as CBOR. diff --git a/src/look_ahead.rs b/src/look_ahead.rs index 90844c54..e8629707 100644 --- a/src/look_ahead.rs +++ b/src/look_ahead.rs @@ -38,7 +38,6 @@ impl<'a> Lookahead<'a> { self.fragments, &field.selection_set.node, name, - self.context, ) } @@ -108,7 +107,6 @@ fn filter<'a>( fragments: &'a HashMap>, selection_set: &'a SelectionSet, name: &str, - context: &'a Context<'a>, ) { for item in &selection_set.items { match &item.node { @@ -122,7 +120,6 @@ fn filter<'a>( fragments, &fragment.node.selection_set.node, name, - context, ), Selection::FragmentSpread(spread) => { if let Some(fragment) = fragments.get(&spread.node.fragment_name.node) { @@ -131,7 +128,6 @@ fn filter<'a>( fragments, &fragment.node.selection_set.node, name, - context, ) } }