Skip to content

Commit

Permalink
clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Aug 27, 2024
1 parent a802682 commit b6f6c23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lazy/binary/raw/v1_1/immutable_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
4 changes: 2 additions & 2 deletions src/lazy/encoder/binary/v1_1/value_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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) => {
Expand Down

0 comments on commit b6f6c23

Please sign in to comment.