Skip to content

Commit

Permalink
fix: use correct value for max key recency in code (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo authored Nov 9, 2023
1 parent 5f1450f commit b92f549
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keyberon/src/action/switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! Limitations:
//! - Maximum opcode length: 4095
//! - Maximum boolean expression depth: 8
//! - Maximum key recency: 7, where 0 is the most recent key press
//!
//! The intended use is to build up a `Switch` struct and use that in the `Layout`.
//!
Expand All @@ -18,7 +19,7 @@ use BreakOrFallthrough::*;

pub const MAX_OPCODE_LEN: u16 = 0x0FFF;
pub const MAX_BOOL_EXPR_DEPTH: usize = 8;
pub const MAX_KEY_RECENCY: u8 = 8;
pub const MAX_KEY_RECENCY: u8 = 7;

pub type Case<'a, T> = (&'a [OpCode], &'a Action<'a, T>, BreakOrFallthrough);

Expand Down

0 comments on commit b92f549

Please sign in to comment.