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)
.await
.map_err(ParseRequestError::Io)?;
Ok(serde_json::from_slice::<BatchRequest>(&data)
.map_err(|e| ParseRequestError::InvalidRequest(Box::new(e)))?)
serde_json::from_slice::<BatchRequest>(&data)
.map_err(|e| ParseRequestError::InvalidRequest(Box::new(e)))
}
/// Receive a GraphQL request from a body as CBOR.

View File

@ -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<Name, Positioned<FragmentDefinition>>,
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,
)
}
}