diff --git a/src/rcore/serialization.rs b/src/rcore/serialization.rs index f451079..217d761 100644 --- a/src/rcore/serialization.rs +++ b/src/rcore/serialization.rs @@ -1,6 +1,3 @@ -#[cfg(doc)] -use super::*; - /// Serialisation mechanism that is chosen over bytestring concatenation /// both for performance and simplicity. /// @@ -8,7 +5,9 @@ use super::*; pub trait Serializer { /// Writes bytes from a slice. Should advance value of [`Serializer::tell()`] by `buf.len()`. fn write(&mut self, buf: &[u8]); - /// Current position of the stream. Used by [`crate::rstd::inlining::CheckedSerialize`]. + /// Current position of the stream. Used by [`CheckedSerialize`]. + /// + /// [`CheckedSerialize`]: crate::rstd::inlining::CheckedSerialize fn tell(&self) -> usize; } @@ -31,6 +30,8 @@ impl Serializer for Vec { /// Trait representing a readable stream used for parsing. /// /// See [`Serializer`], [`FactoryParse::deserialize`]. +/// +/// [`FactoryParse::deserialize`]: super::FactoryParse::deserialize pub trait Deserializer { /// Read at most `n` bytes. fn read_n(&mut self, n: usize) -> &[u8];