projects
/
poker-eval.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
988d5c3
)
fix(card): use u32::from() instead of as_ref() for test_fromstr
author
MA Beaudet
<ma@beaudet.xyz>
Wed, 10 Nov 2021 20:44:02 +0000
(21:44 +0100)
committer
MA Beaudet
<ma@beaudet.xyz>
Wed, 10 Nov 2021 20:44:02 +0000
(21:44 +0100)
src/card.rs
patch
|
blob
|
blame
|
history
diff --git
a/src/card.rs
b/src/card.rs
index
f62a142
..
ce1e989
100644
(file)
--- a/
src/card.rs
+++ b/
src/card.rs
@@
-367,7
+367,7
@@
fn test_fromstr() {
assert_eq!(Card::from_str("fv").unwrap_err(), ParseCardError::Chars);
assert_eq!(Card::from_str("fd").unwrap_err(), ParseCardError::Rank);
assert_eq!(
-
*Card::from_str("Kd").unwrap().as_ref(
),
+
u32::from(Card::from_str("Kd").unwrap()
),
0b00001000_00000000_01001011_00100101_u32
);
}