diff options
Diffstat (limited to 'crates/atuin-nucleo/matcher/src/debug.rs')
| -rw-r--r-- | crates/atuin-nucleo/matcher/src/debug.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/atuin-nucleo/matcher/src/debug.rs b/crates/atuin-nucleo/matcher/src/debug.rs new file mode 100644 index 00000000..b8369f32 --- /dev/null +++ b/crates/atuin-nucleo/matcher/src/debug.rs @@ -0,0 +1,14 @@ +use crate::matrix::{MatrixCell, ScoreCell}; +use std::fmt::{Debug, Formatter, Result}; + +impl Debug for ScoreCell { + fn fmt(&self, f: &mut Formatter<'_>) -> Result { + write!(f, "({}, {})", self.score, self.matched) + } +} + +impl Debug for MatrixCell { + fn fmt(&self, f: &mut Formatter<'_>) -> Result { + write!(f, "({}, {})", (self.0 & 1) != 0, (self.0 & 2) != 0) + } +} |
