From 4c7d78c0125d5f1b9f7f526cf868b6fe0607dbc6 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Mon, 30 Sep 2024 01:06:31 +0100 Subject: [PATCH] Warnings from new rustc --- protobuf-codegen/src/gen/message.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/protobuf-codegen/src/gen/message.rs b/protobuf-codegen/src/gen/message.rs index bd8a1098a..9221ab79c 100644 --- a/protobuf-codegen/src/gen/message.rs +++ b/protobuf-codegen/src/gen/message.rs @@ -146,7 +146,7 @@ impl<'a> MessageGen<'a> { .collect() } - fn required_fields(&'a self) -> Vec<&'a FieldGen> { + fn required_fields(&'a self) -> Vec<&'a FieldGen<'a>> { self.fields .iter() .filter(|f| match f.kind { @@ -156,14 +156,14 @@ impl<'a> MessageGen<'a> { .collect() } - fn message_fields(&'a self) -> Vec<&'a FieldGen> { + fn message_fields(&'a self) -> Vec<&'a FieldGen<'a>> { self.fields .iter() .filter(|f| f.proto_type == field_descriptor_proto::Type::TYPE_MESSAGE) .collect() } - fn fields_except_oneof(&'a self) -> Vec<&'a FieldGen> { + fn fields_except_oneof(&'a self) -> Vec<&'a FieldGen<'a>> { self.fields .iter() .filter(|f| match f.kind { @@ -173,14 +173,14 @@ impl<'a> MessageGen<'a> { .collect() } - fn fields_except_group(&'a self) -> Vec<&'a FieldGen> { + fn fields_except_group(&'a self) -> Vec<&'a FieldGen<'a>> { self.fields .iter() .filter(|f| f.proto_type != field_descriptor_proto::Type::TYPE_GROUP) .collect() } - fn fields_except_oneof_and_group(&'a self) -> Vec<&'a FieldGen> { + fn fields_except_oneof_and_group(&'a self) -> Vec<&'a FieldGen<'a>> { self.fields .iter() .filter(|f| match f.kind {