Use thiserror for error handling with less boilerplate

This commit is contained in:
Steve Cook
2023-02-20 09:41:28 -05:00
parent 01e4f4a126
commit f8b29f37db
135 changed files with 868 additions and 905 deletions

View File

@@ -165,7 +165,7 @@ impl DefaultPlacement {
.codewords
.chars()
.nth(pos)
.ok_or(Exceptions::indexOutOfBounds)? as u32;
.ok_or(Exceptions::INDEX_OUT_OF_BOUNDS)? as u32;
v &= 1 << (8 - bit);
self.setBit(col as usize, row as usize, v != 0);