@@ -194,15 +194,9 @@ impl<'a> PairSet<'a> {
194194 }
195195
196196 pub fn insert ( & mut self , a : & ' a str , b : & ' a str , mutex : bool ) {
197- self . data
198- . entry ( a)
199- . or_default ( )
200- . insert ( b, mutex) ;
201-
202- self . data
203- . entry ( b)
204- . or_default ( )
205- . insert ( a, mutex) ;
197+ self . data . entry ( a) . or_default ( ) . insert ( b, mutex) ;
198+
199+ self . data . entry ( b) . or_default ( ) . insert ( a, mutex) ;
206200 }
207201}
208202
@@ -303,11 +297,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
303297 }
304298 }
305299
306- fn is_same_arguments (
307- & self ,
308- f1_args : & Vec < ( String , Value ) > ,
309- f2_args : & Vec < ( String , Value ) > ,
310- ) -> bool {
300+ fn is_same_arguments ( & self , f1_args : & [ ( String , Value ) ] , f2_args : & [ ( String , Value ) ] ) -> bool {
311301 if f1_args. len ( ) != f2_args. len ( ) {
312302 return false ;
313303 }
@@ -324,10 +314,10 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
324314 // Two types conflict if both types could not apply to a value simultaneously.
325315 // Composite types are ignored as their individual field types will be compared
326316 // later recursively. However List and Non-Null types must match.
327- fn is_type_conflict ( & self , schema : & SchemaDocument , t1 : & Type , t2 : & Type ) -> bool {
317+ fn is_type_conflict ( schema : & SchemaDocument , t1 : & Type , t2 : & Type ) -> bool {
328318 if let Type :: ListType ( t1) = t1 {
329319 if let Type :: ListType ( t2) = t2 {
330- return self . is_type_conflict ( schema, t1, t2) ;
320+ return Self :: is_type_conflict ( schema, t1, t2) ;
331321 } else {
332322 return true ;
333323 }
@@ -339,7 +329,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
339329
340330 if let Type :: NonNullType ( t1) = t1 {
341331 if let Type :: NonNullType ( t2) = t2 {
342- return self . is_type_conflict ( schema, t1, t2) ;
332+ return Self :: is_type_conflict ( schema, t1, t2) ;
343333 } else {
344334 return true ;
345335 }
@@ -422,7 +412,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
422412 let t2 = field2_def. as_ref ( ) . map ( |def| & def. field_type ) ;
423413
424414 if let ( Some ( t1) , Some ( t2) ) = ( t1, t2) {
425- if self . is_type_conflict ( schema, t1, t2) {
415+ if Self :: is_type_conflict ( schema, t1, t2) {
426416 return Some ( Conflict (
427417 ConflictReason (
428418 out_field_name. to_owned ( ) ,
@@ -464,7 +454,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
464454
465455 fn subfield_conflicts (
466456 & self ,
467- conflicts : & Vec < Conflict > ,
457+ conflicts : & [ Conflict ] ,
468458 out_field_name : & str ,
469459 f1_pos : Pos ,
470460 f2_pos : Pos ,
@@ -492,6 +482,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
492482 // Find all conflicts found between two selection sets, including those found
493483 // via spreading in fragments. Called when determining if conflicts exist
494484 // between the sub-fields of two overlapping fields.
485+ #[ allow( clippy:: too_many_arguments) ]
495486 fn find_conflicts_between_sub_selection_sets (
496487 & mut self ,
497488 schema : & ' a SchemaDocument ,
@@ -758,7 +749,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
758749 let mut ast_and_defs = OrderedMap :: new ( ) ;
759750 let mut fragment_names = Vec :: new ( ) ;
760751
761- self . collect_fields_and_fragment_names (
752+ Self :: collect_fields_and_fragment_names (
762753 schema,
763754 parent_type,
764755 selection_set,
@@ -770,7 +761,6 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
770761 }
771762
772763 fn collect_fields_and_fragment_names (
773- & self ,
774764 schema : & ' a SchemaDocument ,
775765 parent_type : Option < & ' a TypeDefinition > ,
776766 selection_set : & ' a SelectionSet ,
@@ -795,7 +785,8 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
795785 }
796786 Selection :: FragmentSpread ( fragment_spread) => {
797787 if !fragment_names
798- . iter ( ) . any ( |n| ( * n) . eq ( & fragment_spread. fragment_name ) )
788+ . iter ( )
789+ . any ( |n| ( * n) . eq ( & fragment_spread. fragment_name ) )
799790 {
800791 fragment_names. push ( & fragment_spread. fragment_name ) ;
801792 }
@@ -811,7 +802,7 @@ impl<'a> OverlappingFieldsCanBeMerged<'a> {
811802 } )
812803 . or ( parent_type) ;
813804
814- self . collect_fields_and_fragment_names (
805+ Self :: collect_fields_and_fragment_names (
815806 schema,
816807 fragment_type,
817808 & inline_fragment. selection_set ,
0 commit comments