We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c389ead commit 7497d6eCopy full SHA for 7497d6e
src/lib.rs
@@ -72,10 +72,10 @@ pub mod abomonated;
72
/// ```
73
///
74
#[inline(always)]
75
-pub unsafe fn encode<T: Abomonation, W: Write>(typed: &T, write: &mut W) -> IOResult<()> {
+pub unsafe fn encode<T: Abomonation, W: Write>(typed: &T, mut write: W) -> IOResult<()> {
76
let slice = std::slice::from_raw_parts(mem::transmute(typed), mem::size_of::<T>());
77
write.write_all(slice)?;
78
- typed.entomb(write)
+ typed.entomb(&mut write)
79
}
80
81
/// Decodes a mutable binary slice into an immutable typed reference.
0 commit comments