diff options
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/fingerprint.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/svh.rs | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_data_structures/src/fingerprint.rs b/compiler/rustc_data_structures/src/fingerprint.rs index c88f3e73cff..a032b039f34 100644 --- a/compiler/rustc_data_structures/src/fingerprint.rs +++ b/compiler/rustc_data_structures/src/fingerprint.rs @@ -144,9 +144,8 @@ impl_stable_hash_via_hash!(Fingerprint); impl<E: rustc_serialize::Encoder> Encodable<E> for Fingerprint { #[inline] - fn encode(&self, s: &mut E) -> Result<(), E::Error> { - s.emit_raw_bytes(&self.to_le_bytes())?; - Ok(()) + fn encode(&self, s: &mut E) { + s.emit_raw_bytes(&self.to_le_bytes()); } } @@ -187,10 +186,10 @@ impl std::fmt::Display for PackedFingerprint { impl<E: rustc_serialize::Encoder> Encodable<E> for PackedFingerprint { #[inline] - fn encode(&self, s: &mut E) -> Result<(), E::Error> { + fn encode(&self, s: &mut E) { // Copy to avoid taking reference to packed field. let copy = self.0; - copy.encode(s) + copy.encode(s); } } diff --git a/compiler/rustc_data_structures/src/svh.rs b/compiler/rustc_data_structures/src/svh.rs index 12ef286091c..61654b9e8f5 100644 --- a/compiler/rustc_data_structures/src/svh.rs +++ b/compiler/rustc_data_structures/src/svh.rs @@ -49,8 +49,8 @@ impl fmt::Display for Svh { } impl<S: Encoder> Encodable<S> for Svh { - fn encode(&self, s: &mut S) -> Result<(), S::Error> { - s.emit_u64(self.as_u64().to_le()) + fn encode(&self, s: &mut S) { + s.emit_u64(self.as_u64().to_le()); } } |
