Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit a4105ea

Browse files
committed
Resolve clippy unnecessary_wraps lints
1 parent 2d60691 commit a4105ea

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/de.rs‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'a> Deserializer<'a> {
107107
}
108108
}
109109

110-
fn ignore_any(&mut self) -> Result<()> {
110+
fn ignore_any(&mut self) {
111111
enum Nest {
112112
Sequence,
113113
Mapping,
@@ -138,15 +138,13 @@ impl<'a> Deserializer<'a> {
138138
},
139139
}
140140
if stack.is_empty() {
141-
return Ok(());
141+
return;
142142
}
143143
}
144144

145145
if !stack.is_empty() {
146146
panic!("missing end event");
147147
}
148-
149-
Ok(())
150148
}
151149

152150
fn visit_sequence<'de, V>(&mut self, visitor: V) -> Result<V::Value>
@@ -998,7 +996,7 @@ impl<'de, 'a, 'r> de::Deserializer<'de> for &'r mut Deserializer<'a> {
998996
where
999997
V: Visitor<'de>,
1000998
{
1001-
self.ignore_any()?;
999+
self.ignore_any();
10021000
visitor.visit_unit()
10031001
}
10041002
}

0 commit comments

Comments
 (0)