Skip to content

Commit

Permalink
Warnings from new rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Sep 30, 2024
1 parent bdc1428 commit 4c7d78c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protobuf-codegen/src/gen/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 4c7d78c

Please sign in to comment.