diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-11 22:06:45 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-19 19:35:22 +0100 |
| commit | 09a638820e6a2383b9b84333aa588ced80982d0a (patch) | |
| tree | d34ae37323511392449bb99f992817b496950ce1 /compiler/rustc_data_structures/src | |
| parent | e5d09fbbe99f87efdb9ed23d6770fa0f62fdffcf (diff) | |
| download | rust-09a638820e6a2383b9b84333aa588ced80982d0a.tar.gz rust-09a638820e6a2383b9b84333aa588ced80982d0a.zip | |
Move raw bytes handling to Encoder/Decoder.
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/fingerprint.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/fingerprint.rs b/compiler/rustc_data_structures/src/fingerprint.rs index 681b49e2ea9..6b533f9f057 100644 --- a/compiler/rustc_data_structures/src/fingerprint.rs +++ b/compiler/rustc_data_structures/src/fingerprint.rs @@ -1,7 +1,7 @@ use crate::stable_hasher; use rustc_serialize::{ opaque::{self, EncodeResult, FileEncodeResult}, - Decodable, Encodable, + Decodable, Decoder, Encodable, Encoder, }; use std::hash::{Hash, Hasher}; use std::mem::{self, MaybeUninit}; @@ -158,7 +158,7 @@ impl<E: rustc_serialize::Encoder> FingerprintEncoder for E { impl FingerprintEncoder for opaque::Encoder { fn encode_fingerprint(&mut self, f: &Fingerprint) -> EncodeResult { let bytes: [u8; 16] = unsafe { mem::transmute([f.0.to_le(), f.1.to_le()]) }; - self.emit_raw_bytes(&bytes); + self.emit_raw_bytes(&bytes)?; Ok(()) } } |
