diff options
| author | kennytm <kennytm@gmail.com> | 2018-09-14 14:50:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-14 14:50:11 +0800 |
| commit | 9c0f946fe2f0b62ec9b60ed40a106e5d91f4a68d (patch) | |
| tree | a186a149e4baa79cfce7145e89236ad4b194384b /src/libserialize/serialize.rs | |
| parent | 33bc6c3daeace99b65d0bd5bd0a4ef2592bd6e07 (diff) | |
| parent | 26dbf56196ccd50a335f38755ea7546f6f1399bd (diff) | |
| download | rust-9c0f946fe2f0b62ec9b60ed40a106e5d91f4a68d.tar.gz rust-9c0f946fe2f0b62ec9b60ed40a106e5d91f4a68d.zip | |
Rollup merge of #54095 - kenta7777:kenta7777#53719, r=davidtwco
Rename all mentions of `nil` to `unit` Fixes #53719. Renamed keywords nil to unit.
Diffstat (limited to 'src/libserialize/serialize.rs')
| -rw-r--r-- | src/libserialize/serialize.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserialize/serialize.rs b/src/libserialize/serialize.rs index 416be50bfe9..f0b49c3d9bc 100644 --- a/src/libserialize/serialize.rs +++ b/src/libserialize/serialize.rs @@ -25,7 +25,7 @@ pub trait Encoder { type Error; // Primitive types: - fn emit_nil(&mut self) -> Result<(), Self::Error>; + fn emit_unit(&mut self) -> Result<(), Self::Error>; fn emit_usize(&mut self, v: usize) -> Result<(), Self::Error>; fn emit_u128(&mut self, v: u128) -> Result<(), Self::Error>; fn emit_u64(&mut self, v: u64) -> Result<(), Self::Error>; @@ -537,7 +537,7 @@ impl Decodable for char { impl Encodable for () { fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_nil() + s.emit_unit() } } |
