Skip to content

Commit

Permalink
regenerate pb-test
Browse files Browse the repository at this point in the history
  • Loading branch information
goffrie committed Nov 21, 2024
1 parent e3b84ef commit 8281e6b
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl ::pb_jelly::Message for Empty {
})
}
fn compute_size(&self) -> usize {
0
0usize
}
fn serialize<W: ::pb_jelly::PbBufferWriter>(&self, w: &mut W) -> ::std::io::Result<()> {
Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
26 changes: 13 additions & 13 deletions pb-test/gen/pb-jelly/proto_pbtest/src/bench.rs.expected
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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<u8>>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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::<City>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited);
}
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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::<CitySSO>(val, 1, ::pb_jelly::wire_format::Type::LengthDelimited);
}
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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);
}
Expand Down
12 changes: 6 additions & 6 deletions pb-test/gen/pb-jelly/proto_pbtest/src/extensions.rs.expected
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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::<i32>(val, 250, ::pb_jelly::wire_format::Type::Varint);
}
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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::<i32>(val, 250, ::pb_jelly::wire_format::Type::Varint);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl ::pb_jelly::Message for Message {
})
}
fn compute_size(&self) -> usize {
0
0usize
}
fn serialize<W: ::pb_jelly::PbBufferWriter>(&self, w: &mut W) -> ::std::io::Result<()> {
Ok(())
Expand Down
Loading

0 comments on commit 8281e6b

Please sign in to comment.