Add inline directives to ensure unit placeholders are optimised away

This commit is contained in:
Brian Carroll 2021-11-05 11:59:25 +00:00
parent d220ed7a23
commit 01b47a2ec7
2 changed files with 3 additions and 0 deletions

View file

@ -27,6 +27,7 @@ impl Serialize for u32 {
// Unit is used as a placeholder in parts of the Wasm spec we don't use yet
impl Serialize for () {
#[inline(always)]
fn serialize<T: SerialBuffer>(&self, _buffer: &mut T) {}
}