diff --git a/crates/tor-bytes/semver.md b/crates/tor-bytes/semver.md index a9f4f688d..56d4d389c 100644 --- a/crates/tor-bytes/semver.md +++ b/crates/tor-bytes/semver.md @@ -1 +1,2 @@ ADDED: EncodeError::always_bug method to turn an EcodeError into a Bug +ADDED: impl Writeable for &impl Writeable diff --git a/crates/tor-bytes/src/lib.rs b/crates/tor-bytes/src/lib.rs index b6f7230e6..32ca8249d 100644 --- a/crates/tor-bytes/src/lib.rs +++ b/crates/tor-bytes/src/lib.rs @@ -109,6 +109,12 @@ impl WriteableOnce for W { } } +impl Writeable for &W { + fn write_onto(&self, b: &mut B) -> EncodeResult<()> { + (*self).write_onto(b) + } +} + // ---------------------------------------------------------------------- /// Trait for an object that can be extracted from a Reader.