Skip to content

Commit

Permalink
Add inline(always) for best benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 committed Sep 25, 2019
1 parent aaf639a commit ae8ea69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub mod abomonated;
/// }
/// ```
///
#[inline]
#[inline(always)]
pub unsafe fn encode<T: Abomonation, W: Write>(typed: &T, write: &mut W) -> IOResult<()> {
let slice = std::slice::from_raw_parts(mem::transmute(typed), mem::size_of::<T>());
write.write_all(slice)?;
Expand Down

0 comments on commit ae8ea69

Please sign in to comment.