Skip to content

Commit

Permalink
Simplify 1-byte FixedUInt write
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Pope <[email protected]>
  • Loading branch information
zslayton and popematt authored Jan 16, 2024
1 parent d05f721 commit 475604c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lazy/encoder/binary/v1_1/value_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ impl<'value, 'top> BinaryValueWriter_1_1<'value, 'top> {
fn write_symbol_id(&mut self, symbol_id: SymbolId) -> IonResult<()> {
match symbol_id {
0..=255 => {
self.push_byte(0xE1); // Single-byte FixedUInt follows
FixedUInt::write_u64(self.encoding_buffer, symbol_id as u64)?;
self.push_bytes([0xE1, symbol_id as u8]);

Check failure on line 194 in src/lazy/encoder/binary/v1_1/value_writer.rs

View workflow job for this annotation

GitHub Actions / Build and Test (ubuntu-latest, all)

mismatched types

Check failure on line 194 in src/lazy/encoder/binary/v1_1/value_writer.rs

View workflow job for this annotation

GitHub Actions / Build and Test (ubuntu-latest, experimental)

mismatched types

Check failure on line 194 in src/lazy/encoder/binary/v1_1/value_writer.rs

View workflow job for this annotation

GitHub Actions / Build and Test (ubuntu-latest)

mismatched types
}
// The u16::MAX range, but biased by 256.
256..=65_791 => {
Expand Down

0 comments on commit 475604c

Please sign in to comment.