Skip to content

Commit

Permalink
[rs] nits
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Apr 8, 2024
1 parent ff8aa45 commit 64bfbf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions rs/src/cart.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use crate::errors::UserException;
use anyhow::{anyhow, Result};
use num_enum::TryFromPrimitive;
Expand Down
7 changes: 6 additions & 1 deletion rs/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ impl std::fmt::Display for UserException {
UserException::UnsupportedCart(cart_type) => {
write!(f, "Unsupported cart type: {:?}", cart_type)
}
_ => write!(f, "Unspecified user error: {:?}", self),
UserException::LogoChecksumFailed(bad_sum) => {
write!(f, "Logo checksum failed: {:?}", bad_sum)
}
UserException::HeaderChecksumFailed(bad_sum) => {
write!(f, "Header checksum failed: {:?}", bad_sum)
}
}
}
}

0 comments on commit 64bfbf3

Please sign in to comment.