tor-bytes: impl Writeable for &impl Writeable
This commit is contained in:
parent
a4a4b19f21
commit
043581fe0e
|
@ -1 +1,2 @@
|
|||
ADDED: EncodeError::always_bug method to turn an EcodeError into a Bug
|
||||
ADDED: impl Writeable for &impl Writeable
|
||||
|
|
|
@ -109,6 +109,12 @@ impl<W: Writeable + Sized> WriteableOnce for W {
|
|||
}
|
||||
}
|
||||
|
||||
impl<W: Writeable + ?Sized> Writeable for &W {
|
||||
fn write_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()> {
|
||||
(*self).write_onto(b)
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/// Trait for an object that can be extracted from a Reader.
|
||||
|
|
Loading…
Reference in New Issue