Skip to content

Commit

Permalink
tweak readme
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Apr 5, 2023
1 parent d9965cc commit f683003
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hex-literal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ let bytes1 = hex!("
00010203 04050607
08090a0b 0c0d0e0f
");
assert_eq!(bytes1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
assert_eq!(
bytes1,
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
);

// It's possible to use several literals (results will be concatenated)
// It's possible to use several literals
// (results will be concatenated)
let bytes2 = hex!(
"00010203 04050607" // first half
"08090a0b" /* block comment */ "0c0d0e0f" // second half
"08090a0b 0c0d0e0f" // second half
);
assert_eq!(bytes1, bytes2);
```
Expand Down

0 comments on commit f683003

Please sign in to comment.