diff options
author | Alex Crichton <alex@alexcrichton.com> | 2017-04-12 09:13:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 09:13:50 -0500 |
commit | 2ae8c79ab8f1ac22c53bd200f7131879fe097d80 (patch) | |
tree | 52648a4c83fa31b0be8b01de7e575483293fcdf3 /src/tokens.rs | |
parent | 9698fb0b120ef0496a75e314bd59ed562d3a2562 (diff) | |
parent | e382b8d895e13b7cac6d35a905aa0490f3bb03d1 (diff) | |
download | milf-rs-2ae8c79ab8f1ac22c53bd200f7131879fe097d80.tar.gz milf-rs-2ae8c79ab8f1ac22c53bd200f7131879fe097d80.zip |
Merge pull request #157 from neosilky/clippy-fixes
Fix issues indicated by clippy
Diffstat (limited to 'src/tokens.rs')
-rw-r--r-- | src/tokens.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tokens.rs b/src/tokens.rs index ec7bb08..11f47f5 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> { @@ -141,7 +141,7 @@ impl<'a> Tokenizer<'a> { if val == "" { return Err(Error::EmptyTableKey(offset)) } - match src.find("\n") { + match src.find('\n') { None => Ok(val), Some(i) => Err(Error::NewlineInTableKey(offset + i)), } @@ -422,7 +422,7 @@ impl MaybeString { } } - fn into_cow<'a>(self, input: &'a str) -> Cow<'a, str> { + fn into_cow(self, input: &str) -> Cow<str> { match self { MaybeString::NotEscaped(start) => Cow::Borrowed(&input[start..]), MaybeString::Owned(s) => Cow::Owned(s), |