Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4c7ae5

Browse files
committed
tests: drop redundant feature guards
The `std` crate is unconditionally pulled in for test builds, hence wecan rely on it. Drop the redundant guards that check against `no_std`.
1 parent8803440 commitc4c7ae5

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
fnenwik8(b:&mutBencher){
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
fnjawiki(b:&mutBencher){
107107
// To benchmark, download & extract `jawiki-20220501-pages-articles-multistream-index.txt` from

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp