Skip to content

Commit b312a49

Browse files
committed
Fix format
1 parent a5d325c commit b312a49

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

graphql_client_codegen/src/codegen.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ pub(crate) fn response_for_query(
7070

7171
let response_data_fields = {
7272
let root_name = operation.root_name(&context.schema);
73-
let opt_definition = context
74-
.schema
75-
.objects
76-
.get(&root_name);
73+
let opt_definition = context.schema.objects.get(&root_name);
7774
let definition = if let Some(definition) = opt_definition {
7875
definition
7976
} else {

graphql_client_codegen/src/operations.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ pub struct Operation<'query> {
2323
}
2424

2525
impl<'query> Operation<'query> {
26-
pub(crate) fn root_name<'schema>(
27-
&self,
28-
schema: &'schema ::schema::Schema,
29-
) -> &'schema str {
26+
pub(crate) fn root_name<'schema>(&self, schema: &'schema ::schema::Schema) -> &'schema str {
3027
match self.operation_type {
3128
OperationType::Query => schema.query_type.unwrap_or("Query"),
3229
OperationType::Mutation => schema.mutation_type.unwrap_or("Mutation"),

0 commit comments

Comments
 (0)