File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
lib/query-planner/src/ast Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -129,17 +129,12 @@ impl PrettyDisplay for SubgraphFetchOperation {
129129
130130impl Display for OperationDefinition {
131131 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
132- if ( self . operation_kind . is_none ( )
133- || self
134- . operation_kind
135- . as_ref ( )
136- . is_none_or ( |k| matches ! ( k, OperationKind :: Query ) ) )
137- && ( self . name . is_none ( ) || self . name . as_ref ( ) . is_none_or ( |n| n. is_empty ( ) ) )
138- && ( self . variable_definitions . is_none ( )
139- || self
140- . variable_definitions
141- . as_ref ( )
142- . is_none_or ( |v| v. is_empty ( ) ) )
132+ if self
133+ . operation_kind
134+ . as_ref ( )
135+ . is_none_or ( |k| matches ! ( k, OperationKind :: Query ) )
136+ && self . name . as_deref ( ) . is_none_or ( str:: is_empty)
137+ && self . variable_definitions . as_ref ( ) . is_none_or ( Vec :: is_empty)
143138 {
144139 // Short form for anonymous query
145140 return self . selection_set . fmt ( f) ;
You can’t perform that action at this time.
0 commit comments