From 8281e6b20e09553e6084e168100e55f83e416b35 Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Wed, 20 Nov 2024 16:24:17 -0800 Subject: [PATCH] regenerate pb-test --- .../src/protobuf/empty.rs.expected | 2 +- .../src/proto_nopackage.rs.expected | 2 +- .../proto_pbtest/src/bench.rs.expected | 26 +-- .../proto_pbtest/src/extensions.rs.expected | 12 +- .../proto_pbtest/src/mod/struct.rs.expected | 2 +- .../proto_pbtest/src/pbtest2.rs.expected | 72 ++++----- .../proto_pbtest/src/pbtest3.rs.expected | 148 +++++++++--------- .../proto_pbtest/src/servicepb.rs.expected | 4 +- 8 files changed, 134 insertions(+), 134 deletions(-) diff --git a/pb-test/gen/pb-jelly/proto_google/src/protobuf/empty.rs.expected b/pb-test/gen/pb-jelly/proto_google/src/protobuf/empty.rs.expected index aebe2ac..3a341ca 100644 --- a/pb-test/gen/pb-jelly/proto_google/src/protobuf/empty.rs.expected +++ b/pb-test/gen/pb-jelly/proto_google/src/protobuf/empty.rs.expected @@ -32,7 +32,7 @@ impl ::pb_jelly::Message for Empty { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) diff --git a/pb-test/gen/pb-jelly/proto_nopackage/src/proto_nopackage.rs.expected b/pb-test/gen/pb-jelly/proto_nopackage/src/proto_nopackage.rs.expected index a5c6403..a58d831 100644 --- a/pb-test/gen/pb-jelly/proto_nopackage/src/proto_nopackage.rs.expected +++ b/pb-test/gen/pb-jelly/proto_nopackage/src/proto_nopackage.rs.expected @@ -34,7 +34,7 @@ impl ::pb_jelly::Message for NoPackage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.field, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/bench.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/bench.rs.expected index 108a443..4f29552 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/bench.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/bench.rs.expected @@ -46,14 +46,14 @@ impl ::pb_jelly::Message for BytesData { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.data { size += ::pb_jelly::helpers::compute_size_field::<::pb_jelly::Lazy<::bytes::Bytes>>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } size } fn compute_grpc_slices_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.data { size += ::pb_jelly::Message::compute_grpc_slices_size(val); } @@ -150,7 +150,7 @@ impl ::pb_jelly::Message for VecData { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.data { size += ::pb_jelly::helpers::compute_size_field::<::std::vec::Vec>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -246,7 +246,7 @@ impl ::pb_jelly::Message for StringMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.data { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -342,7 +342,7 @@ impl ::pb_jelly::Message for StringMessageSSO { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.data { size += ::pb_jelly::helpers::compute_size_field::<::compact_str::CompactString>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -438,7 +438,7 @@ impl ::pb_jelly::Message for Cities { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; for val in &self.cities { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -527,7 +527,7 @@ impl City { self.latitude = Some(v); } pub fn get_latitude(&self) -> f64 { - self.latitude.unwrap_or(0.) + self.latitude.unwrap_or(0f64) } pub fn has_longitude(&self) -> bool { self.longitude.is_some() @@ -536,7 +536,7 @@ impl City { self.longitude = Some(v); } pub fn get_longitude(&self) -> f64 { - self.longitude.unwrap_or(0.) + self.longitude.unwrap_or(0f64) } pub fn has_population(&self) -> bool { self.population.is_some() @@ -666,7 +666,7 @@ impl ::pb_jelly::Message for City { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.city { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -840,7 +840,7 @@ impl ::pb_jelly::Message for CitiesSSO { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; for val in &self.cities { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -929,7 +929,7 @@ impl CitySSO { self.latitude = Some(v); } pub fn get_latitude(&self) -> f64 { - self.latitude.unwrap_or(0.) + self.latitude.unwrap_or(0f64) } pub fn has_longitude(&self) -> bool { self.longitude.is_some() @@ -938,7 +938,7 @@ impl CitySSO { self.longitude = Some(v); } pub fn get_longitude(&self) -> f64 { - self.longitude.unwrap_or(0.) + self.longitude.unwrap_or(0f64) } pub fn has_population(&self) -> bool { self.population.is_some() @@ -1068,7 +1068,7 @@ impl ::pb_jelly::Message for CitySSO { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.city { size += ::pb_jelly::helpers::compute_size_field::<::compact_str::CompactString>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/extensions.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/extensions.rs.expected index aeefb79..36cd6ef 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/extensions.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/extensions.rs.expected @@ -12,7 +12,7 @@ impl Msg { self.base_field = Some(v); } pub fn get_base_field(&self) -> i32 { - self.base_field.unwrap_or(0) + self.base_field.unwrap_or(0i32) } } impl ::std::default::Default for Msg { @@ -47,7 +47,7 @@ impl ::pb_jelly::Message for Msg { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.base_field { size += ::pb_jelly::helpers::compute_size_field::(val, 250, ::pb_jelly::wire_format::Type::Varint); } @@ -121,7 +121,7 @@ impl FakeMsg { self.base_field = Some(v); } pub fn get_base_field(&self) -> i32 { - self.base_field.unwrap_or(0) + self.base_field.unwrap_or(0i32) } pub fn has_singular_primitive(&self) -> bool { self.singular_primitive.is_some() @@ -130,7 +130,7 @@ impl FakeMsg { self.singular_primitive = Some(v); } pub fn get_singular_primitive(&self) -> i32 { - self.singular_primitive.unwrap_or(0) + self.singular_primitive.unwrap_or(0i32) } pub fn has_singular_primitive_with_default(&self) -> bool { self.singular_primitive_with_default.is_some() @@ -139,7 +139,7 @@ impl FakeMsg { self.singular_primitive_with_default = Some(v); } pub fn get_singular_primitive_with_default(&self) -> i32 { - self.singular_primitive_with_default.unwrap_or(0) + self.singular_primitive_with_default.unwrap_or(0i32) } pub fn has_singular_message(&self) -> bool { self.singular_message.is_some() @@ -259,7 +259,7 @@ impl ::pb_jelly::Message for FakeMsg { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.base_field { size += ::pb_jelly::helpers::compute_size_field::(val, 250, ::pb_jelly::wire_format::Type::Varint); } diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/mod/struct.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/mod/struct.rs.expected index 066a65f..cab8b9a 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/mod/struct.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/mod/struct.rs.expected @@ -23,7 +23,7 @@ impl ::pb_jelly::Message for Message { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest2.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest2.rs.expected index 2f7cca4..ae1f4f0 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest2.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest2.rs.expected @@ -416,7 +416,7 @@ impl ::pb_jelly::Message for Option { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) @@ -475,7 +475,7 @@ impl ::pb_jelly::Message for Vec { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) @@ -534,7 +534,7 @@ impl ::pb_jelly::Message for Default { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) @@ -593,7 +593,7 @@ impl ::pb_jelly::Message for String { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) @@ -670,7 +670,7 @@ impl ::pb_jelly::Message for Version0OneOfNoneNullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Version0OneOfNoneNullable_TestOneof::StringOneOf(ref val) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -785,7 +785,7 @@ impl ::pb_jelly::Message for Version1OneOfNoneNullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Version1OneOfNoneNullable_TestOneof::StringOneOf(ref val) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -941,7 +941,7 @@ impl ::pb_jelly::Message for Version2OneOfNoneNullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Version2OneOfNoneNullable_TestOneof::StringOneOf(ref val) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1104,7 +1104,7 @@ impl ::pb_jelly::Message for Version1Enum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.enum_field { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -1197,7 +1197,7 @@ impl ::pb_jelly::Message for Version2Enum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.enum_field { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -1288,7 +1288,7 @@ impl ::pb_jelly::Message for Version1OneOf { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(Version1OneOf_TestOneof::StringOneOf(ref val)) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1404,7 +1404,7 @@ impl ::pb_jelly::Message for Version2OneOf { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(Version2OneOf_TestOneof::StringOneOf(ref val)) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1540,7 +1540,7 @@ impl ::pb_jelly::Message for Version1 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.required_string { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1624,7 +1624,7 @@ impl Version2 { self.optional_int32 = Some(v); } pub fn get_optional_int32(&self) -> i32 { - self.optional_int32.unwrap_or(0) + self.optional_int32.unwrap_or(0i32) } pub fn has_optional_int64(&self) -> bool { self.optional_int64.is_some() @@ -1633,7 +1633,7 @@ impl Version2 { self.optional_int64 = Some(v); } pub fn get_optional_int64(&self) -> i64 { - self.optional_int64.unwrap_or(0) + self.optional_int64.unwrap_or(0i64) } pub fn has_optional_uint32(&self) -> bool { self.optional_uint32.is_some() @@ -1642,7 +1642,7 @@ impl Version2 { self.optional_uint32 = Some(v); } pub fn get_optional_uint32(&self) -> u32 { - self.optional_uint32.unwrap_or(0) + self.optional_uint32.unwrap_or(0u32) } pub fn has_optional_uint64(&self) -> bool { self.optional_uint64.is_some() @@ -1651,7 +1651,7 @@ impl Version2 { self.optional_uint64 = Some(v); } pub fn get_optional_uint64(&self) -> u64 { - self.optional_uint64.unwrap_or(0) + self.optional_uint64.unwrap_or(0u64) } pub fn has_optional_fixed64(&self) -> bool { self.optional_fixed64.is_some() @@ -1660,7 +1660,7 @@ impl Version2 { self.optional_fixed64 = Some(::pb_jelly::Fixed64(v)); } pub fn get_optional_fixed64(&self) -> u64 { - self.optional_fixed64.map(|v| v.0).unwrap_or(0) + self.optional_fixed64.map(|v| v.0).unwrap_or(0u64) } pub fn has_optional_fixed32(&self) -> bool { self.optional_fixed32.is_some() @@ -1669,7 +1669,7 @@ impl Version2 { self.optional_fixed32 = Some(::pb_jelly::Fixed32(v)); } pub fn get_optional_fixed32(&self) -> u32 { - self.optional_fixed32.map(|v| v.0).unwrap_or(0) + self.optional_fixed32.map(|v| v.0).unwrap_or(0u32) } pub fn has_optional_sfixed64(&self) -> bool { self.optional_sfixed64.is_some() @@ -1678,7 +1678,7 @@ impl Version2 { self.optional_sfixed64 = Some(::pb_jelly::Sfixed64(v)); } pub fn get_optional_sfixed64(&self) -> i64 { - self.optional_sfixed64.map(|v| v.0).unwrap_or(0) + self.optional_sfixed64.map(|v| v.0).unwrap_or(0i64) } pub fn has_optional_sfixed32(&self) -> bool { self.optional_sfixed32.is_some() @@ -1687,7 +1687,7 @@ impl Version2 { self.optional_sfixed32 = Some(::pb_jelly::Sfixed32(v)); } pub fn get_optional_sfixed32(&self) -> i32 { - self.optional_sfixed32.map(|v| v.0).unwrap_or(0) + self.optional_sfixed32.map(|v| v.0).unwrap_or(0i32) } pub fn has_optional_double(&self) -> bool { self.optional_double.is_some() @@ -1696,7 +1696,7 @@ impl Version2 { self.optional_double = Some(v); } pub fn get_optional_double(&self) -> f64 { - self.optional_double.unwrap_or(0.) + self.optional_double.unwrap_or(0f64) } pub fn has_optional_bool(&self) -> bool { self.optional_bool.is_some() @@ -1738,7 +1738,7 @@ impl Version2 { self.optional_float = Some(v); } pub fn get_optional_float(&self) -> f32 { - self.optional_float.unwrap_or(0.) + self.optional_float.unwrap_or(0f32) } } impl ::std::default::Default for Version2 { @@ -1902,7 +1902,7 @@ impl ::pb_jelly::Message for Version2 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.required_string { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -2130,7 +2130,7 @@ impl ForeignMessage { self.c = Some(v); } pub fn get_c(&self) -> i32 { - self.c.unwrap_or(0) + self.c.unwrap_or(0i32) } } impl ::std::default::Default for ForeignMessage { @@ -2164,7 +2164,7 @@ impl ::pb_jelly::Message for ForeignMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.c { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -2307,7 +2307,7 @@ impl TestMessage { self.optional_int32 = Some(v); } pub fn get_optional_int32(&self) -> i32 { - self.optional_int32.unwrap_or(0) + self.optional_int32.unwrap_or(0i32) } pub fn has_optional_int64(&self) -> bool { self.optional_int64.is_some() @@ -2316,7 +2316,7 @@ impl TestMessage { self.optional_int64 = Some(v); } pub fn get_optional_int64(&self) -> i64 { - self.optional_int64.unwrap_or(0) + self.optional_int64.unwrap_or(0i64) } pub fn has_optional_uint32(&self) -> bool { self.optional_uint32.is_some() @@ -2325,7 +2325,7 @@ impl TestMessage { self.optional_uint32 = Some(v); } pub fn get_optional_uint32(&self) -> u32 { - self.optional_uint32.unwrap_or(0) + self.optional_uint32.unwrap_or(0u32) } pub fn has_optional_uint64(&self) -> bool { self.optional_uint64.is_some() @@ -2334,7 +2334,7 @@ impl TestMessage { self.optional_uint64 = Some(v); } pub fn get_optional_uint64(&self) -> u64 { - self.optional_uint64.unwrap_or(0) + self.optional_uint64.unwrap_or(0u64) } pub fn has_optional_fixed64(&self) -> bool { self.optional_fixed64.is_some() @@ -2343,7 +2343,7 @@ impl TestMessage { self.optional_fixed64 = Some(::pb_jelly::Fixed64(v)); } pub fn get_optional_fixed64(&self) -> u64 { - self.optional_fixed64.map(|v| v.0).unwrap_or(0) + self.optional_fixed64.map(|v| v.0).unwrap_or(0u64) } pub fn has_optional_fixed32(&self) -> bool { self.optional_fixed32.is_some() @@ -2352,7 +2352,7 @@ impl TestMessage { self.optional_fixed32 = Some(::pb_jelly::Fixed32(v)); } pub fn get_optional_fixed32(&self) -> u32 { - self.optional_fixed32.map(|v| v.0).unwrap_or(0) + self.optional_fixed32.map(|v| v.0).unwrap_or(0u32) } pub fn has_optional_sfixed64(&self) -> bool { self.optional_sfixed64.is_some() @@ -2361,7 +2361,7 @@ impl TestMessage { self.optional_sfixed64 = Some(::pb_jelly::Sfixed64(v)); } pub fn get_optional_sfixed64(&self) -> i64 { - self.optional_sfixed64.map(|v| v.0).unwrap_or(0) + self.optional_sfixed64.map(|v| v.0).unwrap_or(0i64) } pub fn has_optional_sfixed32(&self) -> bool { self.optional_sfixed32.is_some() @@ -2370,7 +2370,7 @@ impl TestMessage { self.optional_sfixed32 = Some(::pb_jelly::Sfixed32(v)); } pub fn get_optional_sfixed32(&self) -> i32 { - self.optional_sfixed32.map(|v| v.0).unwrap_or(0) + self.optional_sfixed32.map(|v| v.0).unwrap_or(0i32) } pub fn has_optional_double(&self) -> bool { self.optional_double.is_some() @@ -2379,7 +2379,7 @@ impl TestMessage { self.optional_double = Some(v); } pub fn get_optional_double(&self) -> f64 { - self.optional_double.unwrap_or(0.) + self.optional_double.unwrap_or(0f64) } pub fn has_optional_bool(&self) -> bool { self.optional_bool.is_some() @@ -2421,7 +2421,7 @@ impl TestMessage { self.optional_float = Some(v); } pub fn get_optional_float(&self) -> f32 { - self.optional_float.unwrap_or(0.) + self.optional_float.unwrap_or(0f32) } pub fn has_optional_foreign_message(&self) -> bool { self.optional_foreign_message.is_some() @@ -3223,7 +3223,7 @@ impl ::pb_jelly::Message for TestMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.optional_int32 { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest3.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest3.rs.expected index 541f7e5..ff8fd24 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest3.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/pbtest3.rs.expected @@ -719,7 +719,7 @@ impl ::pb_jelly::Message for ForeignMessage3 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.c, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -814,7 +814,7 @@ impl ::pb_jelly::Message for Version31OneOfNoneNullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Version31OneOfNoneNullable_TestOneof::StringOneOf(ref val) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -968,7 +968,7 @@ impl ::pb_jelly::Message for Version32OneOfNoneNullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Version32OneOfNoneNullable_TestOneof::StringOneOf(ref val) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1120,7 +1120,7 @@ impl ::pb_jelly::Message for Version31Enum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.enum_field, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -1198,7 +1198,7 @@ impl ::pb_jelly::Message for Version32Enum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.enum_field, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -1283,7 +1283,7 @@ impl ::pb_jelly::Message for Version31OneOf { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(Version31OneOf_TestOneof::StringOneOf(ref val)) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1397,7 +1397,7 @@ impl ::pb_jelly::Message for Version32OneOf { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(Version32OneOf_TestOneof::StringOneOf(ref val)) = self.test_oneof { size += ::pb_jelly::helpers::compute_size_field::<::std::string::String>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -1519,7 +1519,7 @@ impl ::pb_jelly::Message for Version31 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.optional_string1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -1597,7 +1597,7 @@ impl ::pb_jelly::Message for Version31SSO { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::compact_str::CompactString>(&self.optional_string1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -1818,7 +1818,7 @@ impl ::pb_jelly::Message for Version32 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.optional_string1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_int32, 2, ::pb_jelly::wire_format::Type::Varint); size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_int64, 3, ::pb_jelly::wire_format::Type::Varint); @@ -2694,7 +2694,7 @@ impl ::pb_jelly::Message for TestMessage3 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_int32, 1, ::pb_jelly::wire_format::Type::Varint); size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_int64, 2, ::pb_jelly::wire_format::Type::Varint); size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_uint32, 3, ::pb_jelly::wire_format::Type::Varint); @@ -2714,7 +2714,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_nested_enum, 21, ::pb_jelly::wire_format::Type::Varint); size += ::pb_jelly::helpers::compute_size_scalar::(&self.optional_foreign_enum, 22, ::pb_jelly::wire_format::Type::Varint); if !self.repeated_int32.is_empty() { - let mut repeated_int32_size = 0; + let mut repeated_int32_size = 0usize; for val in &self.repeated_int32 { repeated_int32_size += ::pb_jelly::Message::compute_size(val); } @@ -2723,7 +2723,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_int32_size; } if !self.repeated_int64.is_empty() { - let mut repeated_int64_size = 0; + let mut repeated_int64_size = 0usize; for val in &self.repeated_int64 { repeated_int64_size += ::pb_jelly::Message::compute_size(val); } @@ -2732,7 +2732,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_int64_size; } if !self.repeated_uint32.is_empty() { - let mut repeated_uint32_size = 0; + let mut repeated_uint32_size = 0usize; for val in &self.repeated_uint32 { repeated_uint32_size += ::pb_jelly::Message::compute_size(val); } @@ -2741,7 +2741,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_uint32_size; } if !self.repeated_uint64.is_empty() { - let mut repeated_uint64_size = 0; + let mut repeated_uint64_size = 0usize; for val in &self.repeated_uint64 { repeated_uint64_size += ::pb_jelly::Message::compute_size(val); } @@ -2750,7 +2750,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_uint64_size; } if !self.repeated_fixed64.is_empty() { - let mut repeated_fixed64_size = 0; + let mut repeated_fixed64_size = 0usize; for val in &self.repeated_fixed64 { repeated_fixed64_size += ::pb_jelly::Message::compute_size(val); } @@ -2759,7 +2759,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_fixed64_size; } if !self.repeated_fixed32.is_empty() { - let mut repeated_fixed32_size = 0; + let mut repeated_fixed32_size = 0usize; for val in &self.repeated_fixed32 { repeated_fixed32_size += ::pb_jelly::Message::compute_size(val); } @@ -2768,7 +2768,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_fixed32_size; } if !self.repeated_sfixed64.is_empty() { - let mut repeated_sfixed64_size = 0; + let mut repeated_sfixed64_size = 0usize; for val in &self.repeated_sfixed64 { repeated_sfixed64_size += ::pb_jelly::Message::compute_size(val); } @@ -2777,7 +2777,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_sfixed64_size; } if !self.repeated_sfixed32.is_empty() { - let mut repeated_sfixed32_size = 0; + let mut repeated_sfixed32_size = 0usize; for val in &self.repeated_sfixed32 { repeated_sfixed32_size += ::pb_jelly::Message::compute_size(val); } @@ -2786,7 +2786,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_sfixed32_size; } if !self.repeated_double.is_empty() { - let mut repeated_double_size = 0; + let mut repeated_double_size = 0usize; for val in &self.repeated_double { repeated_double_size += ::pb_jelly::Message::compute_size(val); } @@ -2795,7 +2795,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_double_size; } if !self.repeated_bool.is_empty() { - let mut repeated_bool_size = 0; + let mut repeated_bool_size = 0usize; for val in &self.repeated_bool { repeated_bool_size += ::pb_jelly::Message::compute_size(val); } @@ -2810,7 +2810,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += ::pb_jelly::helpers::compute_size_field::<::std::vec::Vec>(val, 45, ::pb_jelly::wire_format::Type::LengthDelimited); } if !self.repeated_float.is_empty() { - let mut repeated_float_size = 0; + let mut repeated_float_size = 0usize; for val in &self.repeated_float { repeated_float_size += ::pb_jelly::Message::compute_size(val); } @@ -2822,7 +2822,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += ::pb_jelly::helpers::compute_size_field::(val, 49, ::pb_jelly::wire_format::Type::LengthDelimited); } if !self.repeated_nested_enum.is_empty() { - let mut repeated_nested_enum_size = 0; + let mut repeated_nested_enum_size = 0usize; for val in &self.repeated_nested_enum { repeated_nested_enum_size += ::pb_jelly::Message::compute_size(val); } @@ -2831,7 +2831,7 @@ impl ::pb_jelly::Message for TestMessage3 { size += repeated_nested_enum_size; } if !self.repeated_foreign_enum.is_empty() { - let mut repeated_foreign_enum_size = 0; + let mut repeated_foreign_enum_size = 0usize; for val in &self.repeated_foreign_enum { repeated_foreign_enum_size += ::pb_jelly::Message::compute_size(val); } @@ -2924,7 +2924,7 @@ impl ::pb_jelly::Message for TestMessage3 { size } fn compute_grpc_slices_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if self.fixed_length != <[u8; 4] as ::std::default::Default>::default() { let val = &self.fixed_length; size += ::pb_jelly::Message::compute_grpc_slices_size(val); @@ -2961,7 +2961,7 @@ impl ::pb_jelly::Message for TestMessage3 { ::pb_jelly::helpers::serialize_scalar::(w, &self.optional_nested_enum, 21, ::pb_jelly::wire_format::Type::Varint)?; ::pb_jelly::helpers::serialize_scalar::(w, &self.optional_foreign_enum, 22, ::pb_jelly::wire_format::Type::Varint)?; if !self.repeated_int32.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_int32 { size += ::pb_jelly::Message::compute_size(val); } @@ -2972,7 +2972,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_int64.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_int64 { size += ::pb_jelly::Message::compute_size(val); } @@ -2983,7 +2983,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_uint32.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_uint32 { size += ::pb_jelly::Message::compute_size(val); } @@ -2994,7 +2994,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_uint64.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_uint64 { size += ::pb_jelly::Message::compute_size(val); } @@ -3005,7 +3005,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_fixed64.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_fixed64 { size += ::pb_jelly::Message::compute_size(val); } @@ -3016,7 +3016,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_fixed32.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_fixed32 { size += ::pb_jelly::Message::compute_size(val); } @@ -3027,7 +3027,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_sfixed64.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_sfixed64 { size += ::pb_jelly::Message::compute_size(val); } @@ -3038,7 +3038,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_sfixed32.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_sfixed32 { size += ::pb_jelly::Message::compute_size(val); } @@ -3049,7 +3049,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_double.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_double { size += ::pb_jelly::Message::compute_size(val); } @@ -3060,7 +3060,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_bool.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_bool { size += ::pb_jelly::Message::compute_size(val); } @@ -3077,7 +3077,7 @@ impl ::pb_jelly::Message for TestMessage3 { ::pb_jelly::helpers::serialize_field::>(w, val, 45, ::pb_jelly::wire_format::Type::LengthDelimited)?; } if !self.repeated_float.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_float { size += ::pb_jelly::Message::compute_size(val); } @@ -3091,7 +3091,7 @@ impl ::pb_jelly::Message for TestMessage3 { ::pb_jelly::helpers::serialize_field::(w, val, 49, ::pb_jelly::wire_format::Type::LengthDelimited)?; } if !self.repeated_nested_enum.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_nested_enum { size += ::pb_jelly::Message::compute_size(val); } @@ -3102,7 +3102,7 @@ impl ::pb_jelly::Message for TestMessage3 { } } if !self.repeated_foreign_enum.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.repeated_foreign_enum { size += ::pb_jelly::Message::compute_size(val); } @@ -3898,7 +3898,7 @@ impl ::pb_jelly::Message for TestMessage3_NestedMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let TestMessage3_NestedMessage_NestedOneof::F(ref val) = self.nested_oneof { size += ::pb_jelly::helpers::compute_size_field::(val, 3, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -4086,7 +4086,7 @@ impl ::pb_jelly::Message for TestMessage3_NestedMessage_File { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; for val in &self.blocklist { size += ::pb_jelly::helpers::compute_size_field::<::std::vec::Vec>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -4166,7 +4166,7 @@ impl ::pb_jelly::Message for TestMessage3_NestedMessage_Dir { }) } fn compute_size(&self) -> usize { - 0 + 0usize } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { Ok(()) @@ -4234,7 +4234,7 @@ impl ::pb_jelly::Message for TestBoxedNonnullable { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; { let val = &*self.field; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -4346,7 +4346,7 @@ impl ::pb_jelly::Message for TestMessage3NonNullableOneof { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let TestMessage3NonNullableOneof_NonNullableOneof::A(ref val) = self.non_nullable_oneof { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -4482,7 +4482,7 @@ impl ::pb_jelly::Message for TestMessage3ErrIfDefaultEnum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; let val = &self.field; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); size @@ -4585,7 +4585,7 @@ impl ::pb_jelly::Message for TestMessage3ErrIfDefaultEnumOneof { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(TestMessage3ErrIfDefaultEnumOneof_Maybe::Something(ref val)) = self.maybe { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -4695,9 +4695,9 @@ impl ::pb_jelly::Message for TestMessage3RepeatedErrIfDefaultEnum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if !self.field.is_empty() { - let mut field_size = 0; + let mut field_size = 0usize; for val in &self.field { field_size += ::pb_jelly::Message::compute_size(val); } @@ -4709,7 +4709,7 @@ impl ::pb_jelly::Message for TestMessage3RepeatedErrIfDefaultEnum { } fn serialize(&self, w: &mut W) -> ::std::io::Result<()> { if !self.field.is_empty() { - let mut size = 0; + let mut size = 0usize; for val in &self.field { size += ::pb_jelly::Message::compute_size(val); } @@ -4790,7 +4790,7 @@ impl ::pb_jelly::Message for TestMessage3ClosedEnum { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.value, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -4868,7 +4868,7 @@ impl ::pb_jelly::Message for TestMessage3ClosedEnum2 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.value, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -4946,7 +4946,7 @@ impl ::pb_jelly::Message for TestMessage3NonOptionalBoxedMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; { let val = &*self.msg; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -5030,7 +5030,7 @@ impl ::pb_jelly::Message for TestMessage3NonOptionalBoxedMessage_InnerMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.name, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -5110,7 +5110,7 @@ impl ::pb_jelly::Message for TestPreserveUnrecognized1 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.string1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size += self._unrecognized.len(); size @@ -5338,7 +5338,7 @@ impl ::pb_jelly::Message for TestPreserveUnrecognized2 { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.a_string1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size += ::pb_jelly::helpers::compute_size_scalar::(&self.a_int32, 2, ::pb_jelly::wire_format::Type::Varint); size += ::pb_jelly::helpers::compute_size_scalar::(&self.a_int64, 3, ::pb_jelly::wire_format::Type::Varint); @@ -5529,7 +5529,7 @@ impl ::pb_jelly::Message for TestPreserveUnrecognizedEmpty { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += self._unrecognized.len(); size } @@ -5603,7 +5603,7 @@ impl ::pb_jelly::Message for TestSmallString { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::compact_str::CompactString>(&self.compact, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -5681,7 +5681,7 @@ impl ::pb_jelly::Message for TestBoxedSmallString { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::compact_str::CompactString>(&self.compact, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -5759,7 +5759,7 @@ impl ::pb_jelly::Message for TestNonOptionalSmallString { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::compact_str::CompactString>(&self.compact, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size } @@ -5839,7 +5839,7 @@ impl ::pb_jelly::Message for TestSmallStringPreserveUnrecognized { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::std::string::String>(&self.compact, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size += self._unrecognized.len(); size @@ -6122,7 +6122,7 @@ impl ::pb_jelly::Message for TestProto3Optional { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.a_message { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -6495,13 +6495,13 @@ impl ::pb_jelly::Message for TestProto3Zerocopy { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::<::pb_jelly::Lazy<::bytes::Bytes>>(&self.data1, 1, ::pb_jelly::wire_format::Type::LengthDelimited); size += ::pb_jelly::helpers::compute_size_scalar::<::pb_jelly::Lazy<::bytes::Bytes>>(&self.data2, 2, ::pb_jelly::wire_format::Type::LengthDelimited); size } fn compute_grpc_slices_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if self.data1 != <::pb_jelly::Lazy<::bytes::Bytes> as ::std::default::Default>::default() { let val = &self.data1; size += ::pb_jelly::Message::compute_grpc_slices_size(val); @@ -6594,14 +6594,14 @@ impl ::pb_jelly::Message for TestProto3ContainsZerocopy { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } size } fn compute_grpc_slices_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { size += ::pb_jelly::Message::compute_grpc_slices_size(val); } @@ -6732,7 +6732,7 @@ impl ::pb_jelly::Message for RecursiveOneof { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(RecursiveOneof_OneofField::Field(ref val)) = self.oneof_field { let val: &RecursiveOneof = &**val; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -6941,7 +6941,7 @@ impl ::pb_jelly::Message for MentionsKeywordPath { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.message { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -7030,7 +7030,7 @@ impl ::pb_jelly::Message for NonNullableOneofKeyword { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let NonNullableOneofKeyword_Async::A(ref val) = self.r#async { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); } @@ -7126,7 +7126,7 @@ impl ::pb_jelly::Message for NonNullableEnumKeyword { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; let val = &self.r#enum; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::Varint); size @@ -7211,7 +7211,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveA { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { let val = &**val; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -7295,7 +7295,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveB { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { let val = &**val; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -7379,7 +7379,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveWithRepeatedA { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; for val in &self.inner { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -7463,7 +7463,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveWithRepeatedB { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } @@ -7545,7 +7545,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveWithBoxedA { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { let val = &**val; size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); @@ -7630,7 +7630,7 @@ impl ::pb_jelly::Message for MutuallyRecursiveWithBoxedB { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; if let Some(ref val) = self.inner { size += ::pb_jelly::helpers::compute_size_field::(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited); } diff --git a/pb-test/gen/pb-jelly/proto_pbtest/src/servicepb.rs.expected b/pb-test/gen/pb-jelly/proto_pbtest/src/servicepb.rs.expected index 18ef4da..0ed0e57 100644 --- a/pb-test/gen/pb-jelly/proto_pbtest/src/servicepb.rs.expected +++ b/pb-test/gen/pb-jelly/proto_pbtest/src/servicepb.rs.expected @@ -34,7 +34,7 @@ impl ::pb_jelly::Message for InpMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.i, 1, ::pb_jelly::wire_format::Type::Varint); size } @@ -112,7 +112,7 @@ impl ::pb_jelly::Message for OutMessage { }) } fn compute_size(&self) -> usize { - let mut size = 0; + let mut size = 0usize; size += ::pb_jelly::helpers::compute_size_scalar::(&self.o, 1, ::pb_jelly::wire_format::Type::Varint); size }