summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scott <sam@osohq.com>2023-01-07 13:32:36 -0600
committerSam Scott <sam@osohq.com>2023-01-07 13:32:36 -0600
commitfbe9c6bcf2bf19dc46ecf60e255d52f4224359f2 (patch)
tree6677801457ab3242c3c4fff98885c69df735287c
parentd9eba81462b39514aa774b913dcba16bec2f8b37 (diff)
Address some clippy nits.
-rw-r--r--src/de/mod.rs4
-rw-r--r--src/de/parse.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/de/mod.rs b/src/de/mod.rs
index 6f71b95..fd34131 100644
--- a/src/de/mod.rs
+++ b/src/de/mod.rs
@@ -548,7 +548,7 @@ impl<'de> de::Deserializer<'de> for LevelDeserializer<'de> {
{
match self.0 {
Level::Nested(_) => self.into_deserializer()?.deserialize_map(visitor),
- Level::OrderedSeq(map) => visitor.visit_seq(LevelSeq(map.into_iter().map(|(_k, v)| v))),
+ Level::OrderedSeq(map) => visitor.visit_seq(LevelSeq(map.into_values())),
Level::Sequence(seq) => visitor.visit_seq(LevelSeq(seq.into_iter())),
Level::Flat(x) => match x {
Cow::Owned(s) => visitor.visit_string(s),
@@ -600,7 +600,7 @@ impl<'de> de::Deserializer<'de> for LevelDeserializer<'de> {
{
match self.0 {
Level::Nested(_) => self.into_deserializer()?.deserialize_map(visitor),
- Level::OrderedSeq(map) => visitor.visit_seq(LevelSeq(map.into_iter().map(|(_k, v)| v))),
+ Level::OrderedSeq(map) => visitor.visit_seq(LevelSeq(map.into_values())),
Level::Sequence(seq) => visitor.visit_seq(LevelSeq(seq.into_iter())),
Level::Flat(_) => {
// For a newtype_struct, attempt to deserialize a flat value as a
diff --git a/src/de/parse.rs b/src/de/parse.rs
index f4d280a..a76f2c5 100644
--- a/src/de/parse.rs
+++ b/src/de/parse.rs
@@ -340,7 +340,7 @@ impl<'a> Parser<'a> {
c => {
if self.strict {
return Err(super::Error::parse_err(
- &format!(
+ format!(
"unexpected character: {}",
String::from_utf8_lossy(&[c])
),
@@ -463,7 +463,7 @@ impl<'a> Parser<'a> {
} else {
// We expected to parse into a map here.
break Err(super::Error::parse_err(
- &format!(
+ format!(
"tried to insert a \
new key into {:?}",
node
@@ -542,7 +542,7 @@ impl<'a> Parser<'a> {
} else {
// We expected to parse into a seq here.
break Err(super::Error::parse_err(
- &format!(
+ format!(
"tried to insert a \
new key into {:?}",
node