Skip to content

Commit 1c424cf

Browse files
committed
Update no_std feature to compile with nightly.
1 parent cff7514 commit 1c424cf

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "unicode-width"
4-
version = "0.1.2"
4+
version = "0.1.3"
55
authors = ["kwantam <kwantam@gmail.com>"]
66

77
homepage = "https://github.com/unicode-rs/unicode-width"

src/lib.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@
4747
html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png")]
4848

4949
#![cfg_attr(feature = "no_std", no_std)]
50-
#![cfg_attr(feature = "no_std", feature(no_std, core, core_prelude, core_slice_ext, core_str_ext))]
50+
#![cfg_attr(feature = "no_std", feature(no_std, core_slice_ext, core_str_ext))]
5151

52-
#![cfg_attr(test, feature(test, unicode))]
53-
54-
#[cfg(feature = "no_std")]
55-
#[macro_use]
56-
extern crate core;
52+
#![cfg_attr(test, feature(test))]
5753

5854
#[cfg(all(test, feature = "no_std"))]
5955
#[macro_use]
@@ -62,9 +58,6 @@ extern crate std;
6258
#[cfg(test)]
6359
extern crate test;
6460

65-
#[cfg(feature = "no_std")]
66-
use core::prelude::*;
67-
6861
use tables::charwidth as cw;
6962
pub use tables::UNICODE_VERSION;
7063

src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn stdlib(b: &mut Bencher) {
3434

3535
b.iter(|| {
3636
for c in string.chars() {
37-
test::black_box(c.width(false));
37+
test::black_box(c.width());
3838
}
3939
});
4040
}

0 commit comments

Comments
 (0)