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/ser.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/ser.rs')
-rw-r--r-- | src/ser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -283,7 +283,7 @@ impl<'a> Serializer<'a> { if array_of_tables { self.dst.push_str("["); } - self.emit_key_part(&state)?; + self.emit_key_part(state)?; if array_of_tables { self.dst.push_str("]"); } @@ -563,7 +563,7 @@ impl<'a, 'b> ser::SerializeMap for SerializeTable<'a, 'b> { SerializeTable::Table { ref mut key, .. } => { key.truncate(0); *key = input.serialize(StringExtractor)?; - if key.contains("\n") { + if key.contains('\n') { return Err(Error::KeyNewline) } } @@ -586,10 +586,10 @@ impl<'a, 'b> ser::SerializeMap for SerializeTable<'a, 'b> { let res = value.serialize(&mut Serializer { dst: &mut *ser.dst, state: State::Table { - key: &key, + key: key, parent: &ser.state, - first: &first, - table_emitted: &table_emitted, + first: first, + table_emitted: table_emitted, }, }); match res { |