Clippy check fixes

This commit is contained in:
Calin Gavriliuc 2022-04-07 17:55:32 -07:00
parent 38005b0de1
commit 869505bf24
2 changed files with 2 additions and 6 deletions

View File

@ -91,8 +91,8 @@ pub async fn receive_batch_json(body: impl AsyncRead) -> Result<BatchRequest, Pa
body.read_to_end(&mut data) body.read_to_end(&mut data)
.await .await
.map_err(ParseRequestError::Io)?; .map_err(ParseRequestError::Io)?;
Ok(serde_json::from_slice::<BatchRequest>(&data) serde_json::from_slice::<BatchRequest>(&data)
.map_err(|e| ParseRequestError::InvalidRequest(Box::new(e)))?) .map_err(|e| ParseRequestError::InvalidRequest(Box::new(e)))
} }
/// Receive a GraphQL request from a body as CBOR. /// Receive a GraphQL request from a body as CBOR.

View File

@ -38,7 +38,6 @@ impl<'a> Lookahead<'a> {
self.fragments, self.fragments,
&field.selection_set.node, &field.selection_set.node,
name, name,
self.context,
) )
} }
@ -108,7 +107,6 @@ fn filter<'a>(
fragments: &'a HashMap<Name, Positioned<FragmentDefinition>>, fragments: &'a HashMap<Name, Positioned<FragmentDefinition>>,
selection_set: &'a SelectionSet, selection_set: &'a SelectionSet,
name: &str, name: &str,
context: &'a Context<'a>,
) { ) {
for item in &selection_set.items { for item in &selection_set.items {
match &item.node { match &item.node {
@ -122,7 +120,6 @@ fn filter<'a>(
fragments, fragments,
&fragment.node.selection_set.node, &fragment.node.selection_set.node,
name, name,
context,
), ),
Selection::FragmentSpread(spread) => { Selection::FragmentSpread(spread) => {
if let Some(fragment) = fragments.get(&spread.node.fragment_name.node) { if let Some(fragment) = fragments.get(&spread.node.fragment_name.node) {
@ -131,7 +128,6 @@ fn filter<'a>(
fragments, fragments,
&fragment.node.selection_set.node, &fragment.node.selection_set.node,
name, name,
context,
) )
} }
} }