From e3976358fd767248015c4bc7d4edecd4db4df7ac Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Thu, 30 Mar 2017 12:38:48 +0100 Subject: Remove unneeded return statements --- src/de.rs | 6 +++--- src/tokens.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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> { -- cgit v1.2.3