Skip to content

Commit e8dbb9c

Browse files
committed
Fix assert! macro usage
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to add missing comma. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
1 parent 5c7c4e0 commit e8dbb9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ fn test_hexadecimal_decimal() {
164164
assert_eq!(hexadecimal_decimal(b"0007".to_vec()).unwrap(), 7);
165165
assert_eq!(hexadecimal_decimal(b"00000001".to_vec()).unwrap(), 1);
166166
assert_eq!(hexadecimal_decimal(b"0100".to_vec()).unwrap(), 256);
167-
assert!(hexadecimal_decimal(b"0".to_vec()).is_err() "Must have even number of hex chars");
168-
assert!(hexadecimal_decimal(b"000".to_vec()).is_err() "Must have even number of hex chars");
169-
assert!(hexadecimal_decimal(b"00000".to_vec()).is_err() "Must have even number of hex chars");
167+
assert!(hexadecimal_decimal(b"0".to_vec()).is_err(), "Must have even number of hex chars");
168+
assert!(hexadecimal_decimal(b"000".to_vec()).is_err(), "Must have even number of hex chars");
169+
assert!(hexadecimal_decimal(b"00000".to_vec()).is_err(), "Must have even number of hex chars");
170170
assert!(
171171
hexadecimal_decimal(b"1122334455667788A".to_vec()).is_err(),
172172
"Max 16 hex chars can be parsed"

0 commit comments

Comments
 (0)