Skip to content

Commit c4c7ae5

Browse files
committed
tests: drop redundant feature guards
The `std` crate is unconditionally pulled in for test builds, hence we can rely on it. Drop the redundant guards that check against `no_std`.
1 parent 8803440 commit c4c7ae5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ fn simple_width_match(c: char) -> Option<usize> {
9393
_ => UnicodeWidthChar::width(c),
9494
}
9595
}
96-
#[cfg(all(feature = "bench", not(feature = "no_std")))]
96+
#[cfg(feature = "bench")]
9797
#[bench]
9898
fn enwik8(b: &mut Bencher) {
9999
// To benchmark, download & unzip `enwik8` from https://data.deepai.org/enwik8.zip
100100
let data_path = "bench_data/enwik8";
101101
let string = std::fs::read_to_string(data_path).unwrap_or_default();
102102
b.iter(|| test::black_box(UnicodeWidthStr::width(string.as_str())));
103103
}
104-
#[cfg(all(feature = "bench", not(feature = "no_std")))]
104+
#[cfg(feature = "bench")]
105105
#[bench]
106106
fn jawiki(b: &mut Bencher) {
107107
// To benchmark, download & extract `jawiki-20220501-pages-articles-multistream-index.txt` from

0 commit comments

Comments
 (0)