diff options
author | Thomas Hurst <tom@hur.st> | 2018-09-04 22:02:13 +0100 |
---|---|---|
committer | Kartikaya Gupta (kats) <staktrace@users.noreply.github.com> | 2018-09-05 04:05:28 -0400 |
commit | afe6608906cc4dfdf45ff111a7d9ba1db76db246 (patch) | |
tree | af0347ec6028f47023bc6deb235383abce383f5f /src | |
parent | 80d7b5ed49cf56ba7713cfb9d091f140fa0e101f (diff) |
Use foo += bar over foo = foo + bar
clippy:assign_op_pattern
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -250,7 +250,7 @@ impl<'a> MailHeader<'a> { }; break; } - ix_search = ix_search + 2; + ix_search += 2; continue; } None => { @@ -351,7 +351,7 @@ pub fn parse_header(raw_data: &[u8]) -> Result<(MailHeader, usize), MailParseErr } } } - ix = ix + 1; + ix += 1; c = match it.next() { None => break, Some(v) => *v, @@ -464,11 +464,11 @@ pub fn parse_headers(raw_data: &[u8]) -> Result<(Vec<MailHeader>, usize), MailPa if ix >= raw_data.len() { break; } else if raw_data[ix] == b'\n' { - ix = ix + 1; + ix += 1; break; } else if raw_data[ix] == b'\r' { if ix + 1 < raw_data.len() && raw_data[ix + 1] == b'\n' { - ix = ix + 2; + ix += 2; break; } else { return Err(MailParseError::Generic( @@ -479,7 +479,7 @@ pub fn parse_headers(raw_data: &[u8]) -> Result<(Vec<MailHeader>, usize), MailPa } let (header, ix_next) = try!(parse_header(&raw_data[ix..])); headers.push(header); - ix = ix + ix_next; + ix += ix_next; } Ok((headers, ix)) } |