aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Lockyer <thisisdaniellockyer@gmail.com>2017-03-30 12:38:48 +0100
committerDaniel Lockyer <thisisdaniellockyer@gmail.com>2017-04-12 09:24:16 +0100
commite3976358fd767248015c4bc7d4edecd4db4df7ac (patch)
tree324ee21d0283e45d6f253c3ffd81b13ca64c6642 /src
parent9698fb0b120ef0496a75e314bd59ed562d3a2562 (diff)
downloadmilf-rs-e3976358fd767248015c4bc7d4edecd4db4df7ac.tar.gz
milf-rs-e3976358fd767248015c4bc7d4edecd4db4df7ac.zip
Remove unneeded return statements
Diffstat (limited to 'src')
-rw-r--r--src/de.rs6
-rw-r--r--src/tokens.rs2
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<T>(s: &str) -> Result<T, Error>
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<Option<Token<'a>>, Error> {