Skip to content

Commit

Permalink
Mute more warnigns
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Jun 26, 2024
1 parent 70ee99f commit abc072d
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion protobuf/src/reflect/dynamic/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl<'a, K: ProtobufValue + Eq + Hash + 'static> ReflectMapIterTrait<'a>
.map(|(k, v)| (K::RuntimeType::as_ref(k), v.as_value_ref()))
}

fn key_type(&self) -> RuntimeType {
fn _key_type(&self) -> RuntimeType {
K::RuntimeType::runtime_type_box()
}

Expand Down
14 changes: 7 additions & 7 deletions protobuf/src/reflect/map/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl DynamicEmptyMap {

pub(crate) fn reflect_iter(&self) -> ReflectMapIter {
ReflectMapIter::new(DynamicEmptyMapIter {
key_type: self.key_type.clone(),
value_type: self.value_type.clone(),
_key_type: self.key_type.clone(),
_value_type: self.value_type.clone(),
})
}
}
Expand All @@ -54,20 +54,20 @@ impl fmt::Debug for DynamicEmptyMap {
}

struct DynamicEmptyMapIter {
key_type: RuntimeType,
value_type: RuntimeType,
_key_type: RuntimeType,
_value_type: RuntimeType,
}

impl<'a> ReflectMapIterTrait<'a> for DynamicEmptyMapIter {
fn next(&mut self) -> Option<(ReflectValueRef<'a>, ReflectValueRef<'a>)> {
None
}

fn key_type(&self) -> RuntimeType {
self.key_type.clone()
fn _key_type(&self) -> RuntimeType {
self._key_type.clone()
}

fn _value_type(&self) -> RuntimeType {
self.value_type.clone()
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 @@ -114,7 +114,7 @@ impl<'a, K: ProtobufValue, V: ProtobufValue, I: Iterator<Item = (&'a K, &'a V)>>
}
}

fn key_type(&self) -> RuntimeType {
fn _key_type(&self) -> RuntimeType {
K::RuntimeType::runtime_type_box()
}

Expand Down
4 changes: 2 additions & 2 deletions protobuf/src/reflect/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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;
fn _key_type(&self) -> RuntimeType;
fn _value_type(&self) -> RuntimeType;
}

Expand Down Expand Up @@ -248,7 +248,7 @@ pub struct ReflectMapRefIter<'a> {

impl<'a> ReflectMapRefIter<'a> {
fn _key_type(&self) -> RuntimeType {
self.iter.imp.key_type()
self.iter.imp._key_type()
}

fn _value_type(&self) -> RuntimeType {
Expand Down
4 changes: 2 additions & 2 deletions protobuf/src/reflect/type_dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::wire_format::WireType;
/// Dynamic version of [`ProtobufType`](crate::reflect::types::ProtobufType).
///
/// This is used internally.
pub trait ProtobufTypeDynamic: Send + Sync + 'static {
pub(crate) trait _ProtobufTypeDynamic: Send + Sync + 'static {
/// Wire type for this type.
fn wire_type(&self) -> WireType;

Expand All @@ -21,7 +21,7 @@ pub trait ProtobufTypeDynamic: Send + Sync + 'static {

pub(crate) struct ProtobufTypeDynamicImpl<T: ProtobufTypeTrait>(pub marker::PhantomData<T>);

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / rustfmt check

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / Miri test

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / linux nightly (all features)

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / linux stable (default features)

struct `ProtobufTypeDynamicImpl` is never constructed

Check warning on line 22 in protobuf/src/reflect/type_dynamic.rs

View workflow job for this annotation

GitHub Actions / linux beta (default features)

struct `ProtobufTypeDynamicImpl` is never constructed

impl<T> ProtobufTypeDynamic for ProtobufTypeDynamicImpl<T>
impl<T> _ProtobufTypeDynamic for ProtobufTypeDynamicImpl<T>
where
T: ProtobufTypeTrait,
<T as ProtobufTypeTrait>::ProtobufValue: ProtobufValue,
Expand Down
Loading

0 comments on commit abc072d

Please sign in to comment.