Skip to content

Commit

Permalink
Implemented Debug for Long.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Feb 23, 2024
1 parent f188f00 commit 96b6a9b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ impl std::fmt::Display for Long {
})
}
}
impl std::fmt::Debug for Long {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self)
}
}

/// Check whether a bunch of numbers are pandigital with respect to the given
/// range.
Expand Down Expand Up @@ -1367,7 +1372,7 @@ mod tests {
match token {
"*" => result = &result * &num,
"+" => result += &num,
"=" => assert_eq!(result.digits, num.digits),
"=" => assert_eq!(result, num),
_ => unreachable!(),
}
}
Expand Down

0 comments on commit 96b6a9b

Please sign in to comment.