Skip to content

Commit

Permalink
Mute warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Jun 26, 2024
1 parent d5c607a commit 70ee99f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions protobuf/src/reflect/dynamic/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl DynamicMap {

struct DynamicMapIterImpl<'a, K: ProtobufValue + Eq + Hash + 'static> {
iter: hash_map::Iter<'a, K, ReflectValueBox>,
value: &'a RuntimeType,
_value_type: &'a RuntimeType,
}

impl<'a, K: ProtobufValue + Eq + Hash + 'static> ReflectMapIterTrait<'a>
Expand All @@ -131,8 +131,8 @@ impl<'a, K: ProtobufValue + Eq + Hash + 'static> ReflectMapIterTrait<'a>
K::RuntimeType::runtime_type_box()
}

fn value_type(&self) -> RuntimeType {
self.value.clone()
fn _value_type(&self) -> RuntimeType {
self._value_type.clone()
}
}

Expand All @@ -141,27 +141,27 @@ impl ReflectMap for DynamicMap {
match &self.maps {
Maps::U32(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
Maps::I32(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
Maps::U64(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
Maps::I64(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
Maps::Bool(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
Maps::String(m) => ReflectMapIter::new(DynamicMapIterImpl {
iter: m.iter(),
value: &self.value,
_value_type: &self.value,
}),
}
}
Expand Down
2 changes: 1 addition & 1 deletion protobuf/src/reflect/map/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<'a> ReflectMapIterTrait<'a> for DynamicEmptyMapIter {
self.key_type.clone()
}

fn value_type(&self) -> RuntimeType {
fn _value_type(&self) -> RuntimeType {
self.value_type.clone()
}
}
2 changes: 1 addition & 1 deletion protobuf/src/reflect/map/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl<'a, K: ProtobufValue, V: ProtobufValue, I: Iterator<Item = (&'a K, &'a V)>>
K::RuntimeType::runtime_type_box()
}

fn value_type(&self) -> RuntimeType {
fn _value_type(&self) -> RuntimeType {
V::RuntimeType::runtime_type_box()
}
}
4 changes: 2 additions & 2 deletions protobuf/src/reflect/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) trait ReflectMap: Debug + Send + Sync + 'static {
pub(crate) trait ReflectMapIterTrait<'a> {
fn next(&mut self) -> Option<(ReflectValueRef<'a>, ReflectValueRef<'a>)>;
fn key_type(&self) -> RuntimeType;

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / rustfmt check

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / Miri test

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / linux nightly (all features)

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / linux stable (default features)

method `key_type` is never used

Check warning on line 36 in protobuf/src/reflect/map/mod.rs

View workflow job for this annotation

GitHub Actions / linux beta (default features)

method `key_type` is never used
fn value_type(&self) -> RuntimeType;
fn _value_type(&self) -> RuntimeType;
}

pub struct ReflectMapIter<'a> {
Expand Down Expand Up @@ -252,7 +252,7 @@ impl<'a> ReflectMapRefIter<'a> {
}

fn _value_type(&self) -> RuntimeType {
self.iter.imp.value_type()
self.iter.imp._value_type()
}
}

Expand Down

0 comments on commit 70ee99f

Please sign in to comment.