Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Aug 12, 2024
1 parent 30ab87b commit 851eb96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ struct Counter {
impl Counter {
fn new() -> Self {
Self {
counts1: vec![0; 511],
counts2: vec![vec![0; 511]; 511],
counts1: vec![0; Code::CODE_MAX as usize],
counts2: vec![vec![0; Code::CODE_MAX as usize]; Code::CODE_MAX as usize],
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ pub struct Code(u16);

impl Code {
/// Maximum code value for the in-memory `Code` representation.
pub const CODE_MAX: u16 = 512;

/// Maximum code value. Code 255 is reserved as the [escape code][`Self::ESCAPE_CODE`].
pub const MAX_CODE: u8 = 254;
///
/// When truncated to u8 this is code 255, which is equivalent to [`Self::ESCAPE_CODE`].
pub const CODE_MAX: u16 = 511;

/// Code used to indicate bytes that are not in the symbol table.
///
Expand Down

0 comments on commit 851eb96

Please sign in to comment.