diff --git a/src/de.rs b/src/de.rs index 42cf86c..9b6a779 100644 --- a/src/de.rs +++ b/src/de.rs @@ -38,7 +38,7 @@ pub fn from_str(s: &str) -> Result let mut d = Deserializer::new(s); let ret = T::deserialize(&mut d)?; d.end()?; - return Ok(ret) + Ok(ret) } /// Errors that can occur when deserializing a type. @@ -357,7 +357,7 @@ impl<'a, 'b> de::SeqVisitor for MapVisitor<'a, 'b> { de: &mut self.de, })?; self.cur_parent = next; - return Ok(Some(ret)) + Ok(Some(ret)) } } @@ -1003,7 +1003,7 @@ impl<'a> Deserializer<'a> { let (line, col) = self.to_linecol(at); err.inner.line = Some(line); err.inner.col = col; - return err + err } /// Converts a byte offset from an error message to a (line, column) pair diff --git a/src/tokens.rs b/src/tokens.rs index ec7bb08..f438fed 100644 --- a/src/tokens.rs +++ b/src/tokens.rs @@ -66,7 +66,7 @@ impl<'a> Tokenizer<'a> { }; // Eat utf-8 BOM t.eatc('\u{feff}'); - return t + t } pub fn next(&mut self) -> Result>, Error> {