diff options
| author | est31 <MTest31@outlook.com> | 2020-10-13 10:17:05 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2020-10-13 14:16:45 +0200 |
| commit | a0fc455d301ba715a10e81bedb1358abbc1d133b (patch) | |
| tree | 97e4e37e70ef61ff67689df830c10472d7db6c1a /compiler/rustc_serialize/src | |
| parent | f54072bb815e2bbaec40eed18c7618904a184470 (diff) | |
| download | rust-a0fc455d301ba715a10e81bedb1358abbc1d133b.tar.gz rust-a0fc455d301ba715a10e81bedb1358abbc1d133b.zip | |
Replace absolute paths with relative ones
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
Diffstat (limited to 'compiler/rustc_serialize/src')
| -rw-r--r-- | compiler/rustc_serialize/src/opaque.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_serialize/src/opaque.rs b/compiler/rustc_serialize/src/opaque.rs index fa4423e261d..8b79c93e760 100644 --- a/compiler/rustc_serialize/src/opaque.rs +++ b/compiler/rustc_serialize/src/opaque.rs @@ -107,7 +107,7 @@ impl serialize::Encoder for Encoder { #[inline] fn emit_i8(&mut self, v: i8) -> EncodeResult { - let as_u8: u8 = unsafe { ::std::mem::transmute(v) }; + let as_u8: u8 = unsafe { std::mem::transmute(v) }; self.emit_u8(as_u8) } @@ -300,13 +300,13 @@ impl<'a> serialize::Decoder for Decoder<'a> { #[inline] fn read_char(&mut self) -> Result<char, Self::Error> { let bits = self.read_u32()?; - Ok(::std::char::from_u32(bits).unwrap()) + Ok(std::char::from_u32(bits).unwrap()) } #[inline] fn read_str(&mut self) -> Result<Cow<'_, str>, Self::Error> { let len = self.read_usize()?; - let s = ::std::str::from_utf8(&self.data[self.position..self.position + len]).unwrap(); + let s = std::str::from_utf8(&self.data[self.position..self.position + len]).unwrap(); self.position += len; Ok(Cow::Borrowed(s)) } |
