Remove unneeded return statements

This commit is contained in:
Daniel Lockyer 2017-03-30 12:38:48 +01:00
parent a87d005cc1
commit de940a3373
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ pub fn from_str<T>(s: &str) -> Result<T, Error>
let mut d = Deserializer::new(s); let mut d = Deserializer::new(s);
let ret = T::deserialize(&mut d)?; let ret = T::deserialize(&mut d)?;
d.end()?; d.end()?;
return Ok(ret) Ok(ret)
} }
/// Errors that can occur when deserializing a type. /// 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, de: &mut self.de,
})?; })?;
self.cur_parent = next; 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); let (line, col) = self.to_linecol(at);
err.inner.line = Some(line); err.inner.line = Some(line);
err.inner.col = col; err.inner.col = col;
return err err
} }
/// Converts a byte offset from an error message to a (line, column) pair /// Converts a byte offset from an error message to a (line, column) pair

View file

@ -66,7 +66,7 @@ impl<'a> Tokenizer<'a> {
}; };
// Eat utf-8 BOM // Eat utf-8 BOM
t.eatc('\u{feff}'); t.eatc('\u{feff}');
return t t
} }
pub fn next(&mut self) -> Result<Option<Token<'a>>, Error> { pub fn next(&mut self) -> Result<Option<Token<'a>>, Error> {