Skip to content

Commit 26d63e8

Browse files
committed
remove unnecessary wraps (clippy::unnecessary_wraps)
1 parent fd94f96 commit 26d63e8

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

graphql_client_codegen/src/codegen.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
},
1111
schema::{InputId, TypeId},
1212
type_qualifiers::GraphqlTypeQualifier,
13-
GeneralError, GraphQLClientCodegenOptions,
13+
GraphQLClientCodegenOptions,
1414
};
1515
use heck::ToSnakeCase;
1616
use proc_macro2::{Ident, Span, TokenStream};
@@ -23,7 +23,7 @@ pub(crate) fn response_for_query(
2323
operation_id: OperationId,
2424
options: &GraphQLClientCodegenOptions,
2525
query: BoundQuery<'_>,
26-
) -> Result<TokenStream, GeneralError> {
26+
) -> TokenStream {
2727
let serde = options.serde_path();
2828

2929
let all_used_types = all_used_types(operation_id, &query);
@@ -47,7 +47,7 @@ pub(crate) fn response_for_query(
4747
let definitions =
4848
render_response_data_fields(operation_id, options, &query).render(&response_derives);
4949

50-
let q = quote! {
50+
quote! {
5151
use #serde::{Serialize, Deserialize};
5252
use super::*;
5353

@@ -71,9 +71,7 @@ pub(crate) fn response_for_query(
7171
#(#fragment_definitions)*
7272

7373
#definitions
74-
};
75-
76-
Ok(q)
74+
}
7775
}
7876

7977
fn generate_variables_struct(

graphql_client_codegen/src/generated_module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl GeneratedModule<'_> {
4242
query: self.resolved_query,
4343
schema: self.schema,
4444
},
45-
)?)
45+
))
4646
}
4747

4848
fn root(&self) -> Result<OperationId, OperationNotFound> {

0 commit comments

Comments
 (0)