From c07ea947fc6c8bbe4897874cbe488c77c524db51 Mon Sep 17 00:00:00 2001 From: kralverde Date: Thu, 22 Aug 2024 15:24:58 -0400 Subject: [PATCH] remove _ from used values --- pumpkin-protocol/src/bytebuf/serializer.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pumpkin-protocol/src/bytebuf/serializer.rs b/pumpkin-protocol/src/bytebuf/serializer.rs index 791002c2c..825288c2a 100644 --- a/pumpkin-protocol/src/bytebuf/serializer.rs +++ b/pumpkin-protocol/src/bytebuf/serializer.rs @@ -122,15 +122,15 @@ impl<'a> ser::Serializer for &'a mut Serializer { fn serialize_newtype_variant( self, _name: &'static str, - _variant_index: u32, + variant_index: u32, _variant: &'static str, - _value: &T, + value: &T, ) -> Result where T: ?Sized + Serialize, { - self.output.put_var_int(&_variant_index.into()); - _value.serialize(self) + self.output.put_var_int(&variant_index.into()); + value.serialize(self) } fn serialize_none(self) -> Result { self.output.put_bool(false); @@ -181,12 +181,12 @@ impl<'a> ser::Serializer for &'a mut Serializer { fn serialize_tuple_variant( self, _name: &'static str, - _variant_index: u32, + variant_index: u32, _variant: &'static str, _len: usize, ) -> Result { // Serialize ENUM index as varint - self.output.put_var_int(&_variant_index.into()); + self.output.put_var_int(&variant_index.into()); Ok(self) } fn serialize_u128(self, _v: u128) -> Result { @@ -217,11 +217,11 @@ impl<'a> ser::Serializer for &'a mut Serializer { fn serialize_unit_variant( self, _name: &'static str, - _variant_index: u32, + variant_index: u32, _variant: &'static str, ) -> Result { // For ENUMs, only write enum index as varint - self.output.put_var_int(&_variant_index.into()); + self.output.put_var_int(&variant_index.into()); Ok(()) } } @@ -250,11 +250,11 @@ impl<'a> ser::SerializeTuple for &'a mut Serializer { type Ok = (); type Error = SerializerError; - fn serialize_element(&mut self, _value: &T) -> Result<(), Self::Error> + fn serialize_element(&mut self, value: &T) -> Result<(), Self::Error> where T: ?Sized + Serialize, { - _value.serialize(&mut **self) + value.serialize(&mut **self) } fn end(self) -> Result<(), Self::Error> {