renamed emit_nil to emit_unit
This commit is contained in:
parent
2d4e34ca8b
commit
d02a5ffaed
19 changed files with 24 additions and 24 deletions
|
@ -1 +1 @@
|
|||
Subproject commit cff0930664b688f1dd22aefb3d16944eb4cdbfd5
|
||||
Subproject commit f51127530d46b9acbf4747c859da185e771cfcf3
|
|
@ -1 +1 @@
|
|||
Subproject commit 7fd493465b7dd6cf3476f0b834884059bbdd1d93
|
||||
Subproject commit 748a5e6742db4a21c4c630a58087f818828e8a0a
|
|
@ -1 +1 @@
|
|||
Subproject commit 821355a6fd642b71988a2f88a3162fb358732012
|
||||
Subproject commit 134f419ee62714590b04712fe6072253bc2a7822
|
|
@ -1 +1 @@
|
|||
Subproject commit e459fb3f07f2b930ccd25d348671b8eae233fd64
|
||||
Subproject commit eebda16e4b45f2eed4310cf7b9872cc752278163
|
|
@ -1 +1 @@
|
|||
Subproject commit 0703bfa72524e01e414477657ca9b64794c5c1c3
|
||||
Subproject commit 2a2f6d96c8dc578d2474742f14c9bab0b36b0408
|
|
@ -1 +1 @@
|
|||
Subproject commit 1844a772b60771d0124a157019f627d60fea4e73
|
||||
Subproject commit a7e78a78e17c8776d7780008ccb3ce541ec64ae9
|
|
@ -1020,7 +1020,7 @@ impl<'enc, 'a, 'tcx, E> Encoder for CacheEncoder<'enc, 'a, 'tcx, E>
|
|||
{
|
||||
type Error = E::Error;
|
||||
|
||||
fn emit_nil(&mut self) -> Result<(), Self::Error> {
|
||||
fn emit_unit(&mut self) -> Result<(), Self::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ macro_rules! encoder_methods {
|
|||
impl<'a, 'tcx> Encoder for EncodeContext<'a, 'tcx> {
|
||||
type Error = <opaque::Encoder as Encoder>::Error;
|
||||
|
||||
fn emit_nil(&mut self) -> Result<(), Self::Error> {
|
||||
fn emit_unit(&mut self) -> Result<(), Self::Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ macro_rules! emit_enquoted_if_mapkey {
|
|||
impl<'a> ::Encoder for Encoder<'a> {
|
||||
type Error = EncoderError;
|
||||
|
||||
fn emit_nil(&mut self) -> EncodeResult {
|
||||
fn emit_unit(&mut self) -> EncodeResult {
|
||||
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
|
||||
write!(self.writer, "null")?;
|
||||
Ok(())
|
||||
|
@ -648,7 +648,7 @@ impl<'a> ::Encoder for Encoder<'a> {
|
|||
}
|
||||
fn emit_option_none(&mut self) -> EncodeResult {
|
||||
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
|
||||
self.emit_nil()
|
||||
self.emit_unit()
|
||||
}
|
||||
fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where
|
||||
F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
|
||||
|
@ -740,7 +740,7 @@ impl<'a> PrettyEncoder<'a> {
|
|||
impl<'a> ::Encoder for PrettyEncoder<'a> {
|
||||
type Error = EncoderError;
|
||||
|
||||
fn emit_nil(&mut self) -> EncodeResult {
|
||||
fn emit_unit(&mut self) -> EncodeResult {
|
||||
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
|
||||
write!(self.writer, "null")?;
|
||||
Ok(())
|
||||
|
@ -923,7 +923,7 @@ impl<'a> ::Encoder for PrettyEncoder<'a> {
|
|||
}
|
||||
fn emit_option_none(&mut self) -> EncodeResult {
|
||||
if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
|
||||
self.emit_nil()
|
||||
self.emit_unit()
|
||||
}
|
||||
fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where
|
||||
F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
|
||||
|
@ -1016,7 +1016,7 @@ impl Encodable for Json {
|
|||
Json::Boolean(v) => v.encode(e),
|
||||
Json::Array(ref v) => v.encode(e),
|
||||
Json::Object(ref v) => v.encode(e),
|
||||
Json::Null => e.emit_nil(),
|
||||
Json::Null => e.emit_unit(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ impl serialize::Encoder for Encoder {
|
|||
type Error = !;
|
||||
|
||||
#[inline]
|
||||
fn emit_nil(&mut self) -> EncodeResult {
|
||||
fn emit_unit(&mut self) -> EncodeResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
src/llvm
2
src/llvm
|
@ -1 +1 @@
|
|||
Subproject commit 2a1cdeadd3ea8e1eba9cc681037b83f07332763b
|
||||
Subproject commit 7243155b1c3da0a980c868a87adebf00e0b33989
|
|
@ -1 +1 @@
|
|||
Subproject commit 05c2f61c384e2097a3a4c648344114fc4ac983be
|
||||
Subproject commit 1ea18a5cb431e24aa838b652ac305acc5e394d6b
|
|
@ -1 +1 @@
|
|||
Subproject commit 2fb77a49b43bf7266793c07a19a06749e6a8ad5a
|
||||
Subproject commit af3f1cd29bc872b932a13083e531255aab233a7e
|
|
@ -1 +1 @@
|
|||
Subproject commit fdd830f52c082b83db0dac3e0066c0cf114050d2
|
||||
Subproject commit e456241f18227c7eb8d78a45daa66c756a9b65e7
|
|
@ -1 +1 @@
|
|||
Subproject commit e6f1e15676c26fdc7c4713647fe007b26f361a8e
|
||||
Subproject commit e0e1bd7ff778e5913b566c9e03224faecc0eb486
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b5cd9d45719414196e254ec17baa598acc8cd25
|
||||
Subproject commit 1263f1ff25bb329b76f74715ad4a7ec0d1f71430
|
|
@ -1 +1 @@
|
|||
Subproject commit 27dec6cae3a8132d8a073aad6775425c85095c99
|
||||
Subproject commit 118e078c5badd520d18b92813fd88789c8d341ab
|
|
@ -1 +1 @@
|
|||
Subproject commit 1c408818c8a752dd584e7858b4afd3ceb011a7da
|
||||
Subproject commit 0f8029f251b569a010cb5cfc5a8bff8bf3c949ac
|
Loading…
Add table
Add a link
Reference in a new issue