about summary refs log tree commit diff
path: root/compiler/rustc_serialize/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-01-20 09:59:30 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2022-01-22 10:38:34 +1100
commit37fbd91eb526cc7e246f7c6c97b1deb9e37879ff (patch)
treee3874af4a0897babe8eb9cf1b0c5b3ebdce387f4 /compiler/rustc_serialize/src
parent416399dc1028545ea0ac6d68fb0b5cc5fa97d393 (diff)
downloadrust-37fbd91eb526cc7e246f7c6c97b1deb9e37879ff.tar.gz
rust-37fbd91eb526cc7e246f7c6c97b1deb9e37879ff.zip
Address review comments.
Diffstat (limited to 'compiler/rustc_serialize/src')
-rw-r--r--compiler/rustc_serialize/src/json.rs1
-rw-r--r--compiler/rustc_serialize/src/opaque.rs3
2 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_serialize/src/json.rs b/compiler/rustc_serialize/src/json.rs
index c005db12099..044de8e4e24 100644
--- a/compiler/rustc_serialize/src/json.rs
+++ b/compiler/rustc_serialize/src/json.rs
@@ -2296,7 +2296,6 @@ impl crate::Decoder for Decoder {
         for c in s.iter_mut() {
             *c = self.read_u8();
         }
-        ()
     }
 
     fn read_enum<T, F>(&mut self, f: F) -> T
diff --git a/compiler/rustc_serialize/src/opaque.rs b/compiler/rustc_serialize/src/opaque.rs
index 89ac7834a39..c272c687a7e 100644
--- a/compiler/rustc_serialize/src/opaque.rs
+++ b/compiler/rustc_serialize/src/opaque.rs
@@ -676,11 +676,10 @@ impl<'a> serialize::Decoder for Decoder<'a> {
     }
 
     #[inline]
-    fn read_raw_bytes_into(&mut self, s: &mut [u8]) -> () {
+    fn read_raw_bytes_into(&mut self, s: &mut [u8]) {
         let start = self.position;
         self.position += s.len();
         s.copy_from_slice(&self.data[start..self.position]);
-        ()
     }
 }