aboutsummaryrefslogtreecommitdiffstats
path: root/matcher/src/debug.rs
diff options
context:
space:
mode:
Diffstat (limited to 'matcher/src/debug.rs')
-rw-r--r--matcher/src/debug.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/matcher/src/debug.rs b/matcher/src/debug.rs
new file mode 100644
index 00000000..b8369f32
--- /dev/null
+++ b/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)
+ }
+}