about summary refs log tree commit diff
path: root/compiler/rustc_serialize/src/json.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-01-19 12:09:19 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2022-01-22 10:22:24 +1100
commit88600a6d7f8f6eb8f85b17b28a17e07eb3a735e5 (patch)
treeb77c2c71bcd0edd8f5e5dbbc838f1ab3908296da /compiler/rustc_serialize/src/json.rs
parentcbaeec14f90b59a91a6b0f17fc046c66fa811892 (diff)
downloadrust-88600a6d7f8f6eb8f85b17b28a17e07eb3a735e5.tar.gz
rust-88600a6d7f8f6eb8f85b17b28a17e07eb3a735e5.zip
Rename `Decoder::read_nil` and `read_unit`.
Because `()` is called "unit" and it makes it match
`Encoder::emit_unit`.
Diffstat (limited to 'compiler/rustc_serialize/src/json.rs')
-rw-r--r--compiler/rustc_serialize/src/json.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_serialize/src/json.rs b/compiler/rustc_serialize/src/json.rs
index cb9df3c3389..d3d72ba72a7 100644
--- a/compiler/rustc_serialize/src/json.rs
+++ b/compiler/rustc_serialize/src/json.rs
@@ -2240,7 +2240,7 @@ macro_rules! read_primitive {
 impl crate::Decoder for Decoder {
     type Error = DecoderError;
 
-    fn read_nil(&mut self) -> DecodeResult<()> {
+    fn read_unit(&mut self) -> DecodeResult<()> {
         expect!(self.pop(), Null)
     }