From 67e64c6c8185f71092637f566a3c06725719afd9 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 26 Feb 2021 12:39:37 +0000 Subject: [PATCH] chore(fmt): run cargo fmt to resolve `graphql-parser` format inconsistencies --- graphql-parser/src/query/refs.rs | 7 ++++++- graphql-parser/src/schema/ast.rs | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/graphql-parser/src/query/refs.rs b/graphql-parser/src/query/refs.rs index 663b2db4d..778c16995 100644 --- a/graphql-parser/src/query/refs.rs +++ b/graphql-parser/src/query/refs.rs @@ -16,7 +16,12 @@ pub enum SelectionRef<'a> { impl<'a> SelectionRef<'a> { pub fn is_field(&self) -> bool { - matches!(self, SelectionRef::Ref(query::Selection::Field(_)) | SelectionRef::Field(_) | SelectionRef::FieldRef(_)) + matches!( + self, + SelectionRef::Ref(query::Selection::Field(_)) + | SelectionRef::Field(_) + | SelectionRef::FieldRef(_) + ) } pub fn is_aliased_field(&self) -> bool { diff --git a/graphql-parser/src/schema/ast.rs b/graphql-parser/src/schema/ast.rs index 434adefdc..3cbff91c6 100644 --- a/graphql-parser/src/schema/ast.rs +++ b/graphql-parser/src/schema/ast.rs @@ -43,11 +43,17 @@ pub enum TypeDefinition<'a> { impl<'a> TypeDefinition<'a> { pub fn is_composite_type(&self) -> bool { - matches!(self, TypeDefinition::Object(_) | TypeDefinition::Interface(_) | TypeDefinition::Union(_)) + matches!( + self, + TypeDefinition::Object(_) | TypeDefinition::Interface(_) | TypeDefinition::Union(_) + ) } pub fn is_abstract_type(&self) -> bool { - matches!(self, TypeDefinition::Interface(_) | TypeDefinition::Union(_)) + matches!( + self, + TypeDefinition::Interface(_) | TypeDefinition::Union(_) + ) } }