Skip to content

Commit 8ee8722

Browse files
committed
style: Remove explicit lifetimes
This solves clippy warnings like this: ``` error: the following explicit lifetimes could be elided: 'a --> graphql_client_codegen/src/codegen/selection.rs:394:6 | 394 | impl<'a> ExpandedField<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `-D clippy::needless-lifetimes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]` help: elide the lifetimes | 394 - impl<'a> ExpandedField<'a> { 394 + impl ExpandedField<'_> { | ```
1 parent 9b91a7f commit 8ee8722

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

graphql_client_codegen/src/codegen/selection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ struct ExpandedField<'a> {
391391
boxed: bool,
392392
}
393393

394-
impl<'a> ExpandedField<'a> {
394+
impl ExpandedField<'_> {
395395
fn render(&self, options: &GraphQLClientCodegenOptions) -> Option<TokenStream> {
396396
let ident = Ident::new(&self.rust_name, Span::call_site());
397397
let qualified_type = decorate_type(
@@ -457,7 +457,7 @@ struct ExpandedVariant<'a> {
457457
is_default_variant: bool,
458458
}
459459

460-
impl<'a> ExpandedVariant<'a> {
460+
impl ExpandedVariant<'_> {
461461
fn render(&self) -> TokenStream {
462462
let name_ident = Ident::new(&self.name, Span::call_site());
463463
let optional_type_ident = self.variant_type.as_ref().map(|variant_type| {

graphql_client_codegen/src/generated_module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(crate) struct GeneratedModule<'a> {
3232
pub options: &'a crate::GraphQLClientCodegenOptions,
3333
}
3434

35-
impl<'a> GeneratedModule<'a> {
35+
impl GeneratedModule<'_> {
3636
/// Generate the items for the variables and the response that will go inside the module.
3737
fn build_impls(&self) -> Result<TokenStream, BoxError> {
3838
Ok(crate::codegen::response_for_query(

0 commit comments

Comments
 (0)