Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b3fd448

Browse files
danieleadesdaniel.eades
authored and
daniel.eades
committedFeb 7, 2025
remove some needlessly mutable references (clippy::needless_pass_by_ref_mut)
1 parent 882b5d6 commit b3fd448

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed
 

‎graphql_client_codegen/src/schema/graphql_parser_conversion.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ where
151151
});
152152
}
153153

154-
fn ingest_union<'doc, T>(schema: &mut Schema, union: &mut UnionType<'doc, T>)
154+
fn ingest_union<'doc, T>(schema: &mut Schema, union: &UnionType<'doc, T>)
155155
where
156156
T: graphql_parser::query::Text<'doc>,
157157
{
@@ -238,10 +238,8 @@ fn ingest_object_type_extension<'doc, T>(
238238
object.fields.extend(field_ids);
239239
}
240240

241-
fn ingest_scalar<'doc, T>(
242-
schema: &mut Schema,
243-
scalar: &mut graphql_parser::schema::ScalarType<'doc, T>,
244-
) where
241+
fn ingest_scalar<'doc, T>(schema: &mut Schema, scalar: &graphql_parser::schema::ScalarType<'doc, T>)
242+
where
245243
T: graphql_parser::query::Text<'doc>,
246244
{
247245
let name: String = scalar.name.as_ref().into();

‎graphql_client_codegen/src/schema/json_conversion.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,11 @@ fn ingest_input(schema: &mut Schema, input: &mut FullType) {
297297
schema.stored_inputs.push(input);
298298
}
299299

300-
fn resolve_field_type(schema: &mut Schema, typeref: &mut TypeRef) -> super::StoredFieldType {
300+
fn resolve_field_type(schema: &Schema, typeref: &mut TypeRef) -> super::StoredFieldType {
301301
from_json_type_inner(schema, typeref)
302302
}
303303

304-
fn resolve_input_field_type(
305-
schema: &mut Schema,
306-
typeref: &mut TypeRef,
307-
) -> super::StoredInputFieldType {
304+
fn resolve_input_field_type(schema: &Schema, typeref: &mut TypeRef) -> super::StoredInputFieldType {
308305
let field_type = from_json_type_inner(schema, typeref);
309306

310307
super::StoredInputFieldType {
@@ -324,7 +321,7 @@ fn json_type_qualifiers_depth(typeref: &mut TypeRef) -> usize {
324321
}
325322
}
326323

327-
fn from_json_type_inner(schema: &mut Schema, inner: &mut TypeRef) -> super::StoredFieldType {
324+
fn from_json_type_inner(schema: &Schema, inner: &mut TypeRef) -> super::StoredFieldType {
328325
use crate::type_qualifiers::GraphqlTypeQualifier;
329326
use graphql_introspection_query::introspection_response::__TypeKind;
330327

0 commit comments

Comments
 (0)
Please sign in to comment.