Use test_hex_unwrap in bench code

We would like to move the dependency on `hex_lit` to be a
dev-dependency but currently are using it in bench code. The bench
code is enabled if any downstream crate tries to build with
`--cfg=bench` and during such a build our dev-dependencies are not
available.

We also have the `test_hex_unwrap` macro in the `hex` crate and since
the bench code is more or less test code (and the macro call is not
being benchmarked) we can use that macro instead.
This commit is contained in:
Tobin C. Harding 2024-05-23 09:16:08 +10:00
parent 13569b86a1
commit 6e5592db77
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 1 deletions

View File

@ -2463,7 +2463,7 @@ mod tests {
#[cfg(bench)]
mod benches {
use hex_lit::hex;
use hex::test_hex_unwrap as hex;
use io::sink;
use test::{black_box, Bencher};