From d7a20e2b4811df0026c068ea703ed8b530f6c7c7 Mon Sep 17 00:00:00 2001 From: Avery Harnish Date: Thu, 6 May 2021 13:11:40 -0500 Subject: [PATCH] chore: address clippy 1.52 warnings --- crates/rover-client/src/query/subgraph/delete.rs | 5 +---- crates/rover-client/src/query/subgraph/publish.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/rover-client/src/query/subgraph/delete.rs b/crates/rover-client/src/query/subgraph/delete.rs index 2ee0f02f0..b455c712f 100644 --- a/crates/rover-client/src/query/subgraph/delete.rs +++ b/crates/rover-client/src/query/subgraph/delete.rs @@ -55,10 +55,7 @@ fn build_response(response: RawMutationResponse) -> DeleteServiceResponse { let composition_errors: Vec = response .errors .iter() - .filter_map(|error| match error { - Some(e) => Some(e.message.clone()), - None => None, - }) + .filter_map(|error| error.as_ref().map(|e| e.message.clone())) .collect(); // if there are no errors, just return None diff --git a/crates/rover-client/src/query/subgraph/publish.rs b/crates/rover-client/src/query/subgraph/publish.rs index 2377a1ba3..e95aaf7e9 100644 --- a/crates/rover-client/src/query/subgraph/publish.rs +++ b/crates/rover-client/src/query/subgraph/publish.rs @@ -54,10 +54,7 @@ fn build_response(publish_response: UpdateResponse) -> PublishPartialSchemaRespo let composition_errors: Vec = publish_response .errors .iter() - .filter_map(|error| match error { - Some(e) => Some(e.message.clone()), - None => None, - }) + .filter_map(|error| error.as_ref().map(|e| e.message.clone())) .collect(); // if there are no errors, just return None