diff --git a/src/blocks/literals_section.rs b/src/blocks/literals_section.rs index d8e9d71..0289c0c 100644 --- a/src/blocks/literals_section.rs +++ b/src/blocks/literals_section.rs @@ -22,7 +22,9 @@ pub enum LiteralsSectionParseError { #[display(fmt = "{_0:?}")] #[from] GetBitsError(GetBitsError), - #[display(fmt = "Not enough byte to parse the literals section header. Have: {have}, Need: {need}")] + #[display( + fmt = "Not enough byte to parse the literals section header. Have: {have}, Need: {need}" + )] NotEnoughBytes { have: usize, need: u8 }, } diff --git a/src/blocks/sequence_section.rs b/src/blocks/sequence_section.rs index d2befe9..97d1ab3 100644 --- a/src/blocks/sequence_section.rs +++ b/src/blocks/sequence_section.rs @@ -58,7 +58,9 @@ impl Default for SequencesHeader { #[derive(Debug, derive_more::Display)] #[non_exhaustive] pub enum SequencesHeaderParseError { - #[display(fmt = "source must have at least {need_at_least} bytes to parse header; got {got} bytes")] + #[display( + fmt = "source must have at least {need_at_least} bytes to parse header; got {got} bytes" + )] NotEnoughBytes { need_at_least: u8, got: usize }, } diff --git a/src/decoding/bit_reader.rs b/src/decoding/bit_reader.rs index 701861a..abaae98 100644 --- a/src/decoding/bit_reader.rs +++ b/src/decoding/bit_reader.rs @@ -6,7 +6,9 @@ pub struct BitReader<'s> { #[derive(Debug, derive_more::Display)] #[non_exhaustive] pub enum GetBitsError { - #[display(fmt = "Cant serve this request. The reader is limited to {limit} bits, requested {num_requested_bits} bits")] + #[display( + fmt = "Cant serve this request. The reader is limited to {limit} bits, requested {num_requested_bits} bits" + )] TooManyBits { num_requested_bits: usize, limit: u8, diff --git a/src/decoding/sequence_section_decoder.rs b/src/decoding/sequence_section_decoder.rs index b1591a3..5b58f83 100644 --- a/src/decoding/sequence_section_decoder.rs +++ b/src/decoding/sequence_section_decoder.rs @@ -10,15 +10,17 @@ use alloc::vec::Vec; #[non_exhaustive] pub enum DecodeSequenceError { #[display(fmt = transparent)] - #[from] + #[from] GetBitsError(GetBitsError), #[display(fmt = transparent)] - #[from] + #[from] FSEDecoderError(FSEDecoderError), #[display(fmt = transparent)] - #[from] + #[from] FSETableError(FSETableError), - #[display(fmt = "Padding at the end of the sequence_section was more than a byte long: {skipped_bits} bits. Probably caused by data corruption")] + #[display( + fmt = "Padding at the end of the sequence_section was more than a byte long: {skipped_bits} bits. Probably caused by data corruption" + )] ExtraPadding { skipped_bits: i32 }, #[display(fmt = "Do not support offsets bigger than 1<<32; got: {offset_code}")] UnsupportedOffset { offset_code: u8 }, diff --git a/src/fse/fse_decoder.rs b/src/fse/fse_decoder.rs index 5769f56..e76f670 100644 --- a/src/fse/fse_decoder.rs +++ b/src/fse/fse_decoder.rs @@ -47,7 +47,7 @@ pub struct FSEDecoder<'table> { #[non_exhaustive] pub enum FSEDecoderError { #[display(fmt = transparent)] - #[from] + #[from] GetBitsError(GetBitsError), #[display(fmt = "Tried to use an uninitialized table!")] TableIsUninitialized,