Skip to content

Commit 468de3c

Browse files
authored
Change test to require impl (mainmatter#87)
impl std::ops::Add<&SaturatingU16> for SaturatingU16
1 parent c86360f commit 468de3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exercises/04_traits/14_outro/tests/integration.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ fn test_saturating_u16() {
66
let b: SaturatingU16 = 5u8.into();
77
let c: SaturatingU16 = u16::MAX.into();
88
let d: SaturatingU16 = (&1u16).into();
9+
let e = &c;
910

1011
assert_eq!(a + b, SaturatingU16::from(15u16));
1112
assert_eq!(a + c, SaturatingU16::from(u16::MAX));
1213
assert_eq!(a + d, SaturatingU16::from(11u16));
1314
assert_eq!(a + a, 20u16);
1415
assert_eq!(a + 5u16, 15u16);
15-
assert_eq!(a + &u16::MAX, SaturatingU16::from(u16::MAX));
16+
assert_eq!(a + e, SaturatingU16::from(u16::MAX));
1617
}

0 commit comments

Comments
 (0)