diff --git a/src/lazy/binary/raw/v1_1/immutable_buffer.rs b/src/lazy/binary/raw/v1_1/immutable_buffer.rs index 26b1e881..aed2ce23 100644 --- a/src/lazy/binary/raw/v1_1/immutable_buffer.rs +++ b/src/lazy/binary/raw/v1_1/immutable_buffer.rs @@ -1546,7 +1546,7 @@ mod tests { // to its own address. let mut macro_definitions = String::from("$ion_encoding::(\n (macro_table\n"); for address in MacroTable::FIRST_USER_MACRO_ID..MAX_TEST_MACRO_ADDRESS { - write!(macro_definitions, " (macro m{address} () {address})\n")?; + writeln!(macro_definitions, " (macro m{address} () {address})")?; } macro_definitions.push_str(" )\n)\n"); let encoding_directive = Element::read_one(macro_definitions)?; diff --git a/src/lazy/encoder/binary/v1_1/value_writer.rs b/src/lazy/encoder/binary/v1_1/value_writer.rs index 3ba9838c..d617dfac 100644 --- a/src/lazy/encoder/binary/v1_1/value_writer.rs +++ b/src/lazy/encoder/binary/v1_1/value_writer.rs @@ -702,7 +702,7 @@ impl<'value, 'top> BinaryValueWriter_1_1<'value, 'top> { // Opcode with low nibble setting bias 0x40 | low_opcode_nibble as u8, // Remaining byte of magnitude in biased address - 0xFF & biased as u8, + biased as u8, ]); } MacroIdRef::LocalAddress(address) if address <= MAX_20_BIT_ADDRESS => { @@ -716,7 +716,7 @@ impl<'value, 'top> BinaryValueWriter_1_1<'value, 'top> { 0x50 | low_opcode_nibble as u8, ], // Remaining bytes of magnitude in biased address - &(0xFFFF & biased as u16).to_le_bytes(), + &(biased as u16).to_le_bytes(), ]); } MacroIdRef::LocalAddress(_address) => {