Skip to content

Commit df7c07a

Browse files
committed
Remove unnecessary qualifications
1 parent 2bcd59e commit df7c07a

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
missing_copy_implementations,
66
missing_debug_implementations,
77
missing_docs,
8-
rust_2018_idioms
8+
rust_2018_idioms,
9+
unused_lifetimes,
10+
unused_qualifications
911
)]
1012

1113
#[cfg(all(feature = "alloc", not(feature = "std")))]

src/ser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,15 @@ impl<'a> ser::Serializer for &'a mut MapKeySerializer {
516516
Err(Error::UnsupportedType)
517517
}
518518

519-
fn serialize_newtype_struct<T: ?Sized + ser::Serialize>(
519+
fn serialize_newtype_struct<T: ?Sized + Serialize>(
520520
self,
521521
_name: &'static str,
522522
_value: &T,
523523
) -> Result<Vec<u8>> {
524524
Err(Error::UnsupportedType)
525525
}
526526

527-
fn serialize_newtype_variant<T: ?Sized + ser::Serialize>(
527+
fn serialize_newtype_variant<T: ?Sized + Serialize>(
528528
self,
529529
_name: &'static str,
530530
_variant_index: u32,
@@ -538,7 +538,7 @@ impl<'a> ser::Serializer for &'a mut MapKeySerializer {
538538
Err(Error::UnsupportedType)
539539
}
540540

541-
fn serialize_some<T: ?Sized + ser::Serialize>(self, _value: &T) -> Result<Vec<u8>> {
541+
fn serialize_some<T: ?Sized + Serialize>(self, _value: &T) -> Result<Vec<u8>> {
542542
Err(Error::UnsupportedType)
543543
}
544544

src/value/de.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use super::{Number, Value};
44
use crate::error::Error;
55
use serde::de::{
6-
self, DeserializeOwned, DeserializeSeed, IntoDeserializer, MapAccess, SeqAccess, Visitor,
6+
DeserializeOwned, DeserializeSeed, IntoDeserializer, MapAccess, SeqAccess, Visitor,
77
};
88
use serde::forward_to_deserialize_any;
99
use serde_bytes::ByteBuf;
@@ -97,14 +97,14 @@ impl<'de> serde::Deserializer<'de> for Value {
9797
visitor: V,
9898
) -> Result<V::Value, Self::Error>
9999
where
100-
V: de::Visitor<'de>,
100+
V: Visitor<'de>,
101101
{
102102
visitor.visit_newtype_struct(self)
103103
}
104104

105105
fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
106106
where
107-
V: de::Visitor<'de>,
107+
V: Visitor<'de>,
108108
{
109109
self.deserialize_seq(visitor)
110110
}
@@ -116,7 +116,7 @@ impl<'de> serde::Deserializer<'de> for Value {
116116
visitor: V,
117117
) -> Result<V::Value, Self::Error>
118118
where
119-
V: de::Visitor<'de>,
119+
V: Visitor<'de>,
120120
{
121121
self.deserialize_seq(visitor)
122122
}

src/value/ser.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -400,15 +400,15 @@ impl ser::Serializer for &mut DictKeySerializer {
400400
Err(Error::UnsupportedType)
401401
}
402402

403-
fn serialize_newtype_struct<T: ?Sized + ser::Serialize>(
403+
fn serialize_newtype_struct<T: ?Sized + Serialize>(
404404
self,
405405
_name: &'static str,
406406
_value: &T,
407407
) -> Result<Self::Ok> {
408408
Err(Error::UnsupportedType)
409409
}
410410

411-
fn serialize_newtype_variant<T: ?Sized + ser::Serialize>(
411+
fn serialize_newtype_variant<T: ?Sized + Serialize>(
412412
self,
413413
_name: &'static str,
414414
_variant_index: u32,
@@ -422,7 +422,7 @@ impl ser::Serializer for &mut DictKeySerializer {
422422
Err(Error::UnsupportedType)
423423
}
424424

425-
fn serialize_some<T: ?Sized + ser::Serialize>(self, _value: &T) -> Result<Self::Ok> {
425+
fn serialize_some<T: ?Sized + Serialize>(self, _value: &T) -> Result<Self::Ok> {
426426
Err(Error::UnsupportedType)
427427
}
428428

@@ -637,7 +637,7 @@ mod tests {
637637
use serde::Serializer;
638638

639639
assert!(matches!(
640-
super::Serializer.serialize_unit_struct("Nothing"),
640+
Serializer.serialize_unit_struct("Nothing"),
641641
Err(Error::UnsupportedType)
642642
));
643643
}
@@ -647,7 +647,7 @@ mod tests {
647647
use serde::Serializer;
648648

649649
assert!(matches!(
650-
super::Serializer.serialize_unit_variant("Nothing", 0, "Case"),
650+
Serializer.serialize_unit_variant("Nothing", 0, "Case"),
651651
Err(Error::UnsupportedType)
652652
));
653653
}
@@ -656,17 +656,15 @@ mod tests {
656656
fn test_serialize_newtype_struct() {
657657
use serde::Serializer;
658658

659-
assert!(super::Serializer
660-
.serialize_newtype_struct("Nothing", &2)
661-
.is_ok());
659+
assert!(Serializer.serialize_newtype_struct("Nothing", &2).is_ok());
662660
}
663661

664662
#[test]
665663
fn test_serialize_newtype_variant() {
666664
use serde::Serializer;
667665

668666
assert!(matches!(
669-
super::Serializer.serialize_unit_variant("Nothing", 0, "Case"),
667+
Serializer.serialize_unit_variant("Nothing", 0, "Case"),
670668
Err(Error::UnsupportedType)
671669
));
672670
}
@@ -695,7 +693,7 @@ mod tests {
695693
use serde::Serializer;
696694

697695
assert!(matches!(
698-
super::Serializer.serialize_tuple(0),
696+
Serializer.serialize_tuple(0),
699697
Err(Error::UnsupportedType)
700698
));
701699
}
@@ -705,7 +703,7 @@ mod tests {
705703
use serde::Serializer;
706704

707705
assert!(matches!(
708-
super::Serializer.serialize_tuple_struct("Tuple Struct", 2),
706+
Serializer.serialize_tuple_struct("Tuple Struct", 2),
709707
Err(Error::UnsupportedType)
710708
));
711709
}
@@ -715,7 +713,7 @@ mod tests {
715713
use serde::Serializer;
716714

717715
assert!(matches!(
718-
super::Serializer.serialize_tuple_variant("Tuple Variant", 2, "Case", 1),
716+
Serializer.serialize_tuple_variant("Tuple Variant", 2, "Case", 1),
719717
Err(Error::UnsupportedType)
720718
));
721719
}
@@ -725,7 +723,7 @@ mod tests {
725723
use serde::Serializer;
726724

727725
assert!(matches!(
728-
super::Serializer.serialize_struct_variant("Struct Variant", 2, "Case", 1),
726+
Serializer.serialize_struct_variant("Struct Variant", 2, "Case", 1),
729727
Err(Error::UnsupportedType)
730728
));
731729
}

0 commit comments

Comments
 (0)