diff options
| author | bors <bors@rust-lang.org> | 2017-03-03 09:57:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-03-03 09:57:57 +0000 |
| commit | 1476105dd3ae92042800d7b8e8e860dd4a60c59b (patch) | |
| tree | f0ea5b9d54071b007dc11b98dc186ee3d996dbd1 /src/libstd | |
| parent | 042728e7ff27e305130747c0d1f19d4a67587863 (diff) | |
| parent | 24b39c51af8b7320fd825a66a239a497f20b0ece (diff) | |
| download | rust-1476105dd3ae92042800d7b8e8e860dd4a60c59b.tar.gz rust-1476105dd3ae92042800d7b8e8e860dd4a60c59b.zip | |
Auto merge of #40189 - SimonSapin:one-width, r=alexcrichton
Reduce std_unicode’s public API
* Only keep one copy of the `UTF8_CHAR_WIDTH` table instead of one of each of libcore and libstd_unicode.
* Move the `utf8_char_width` function to `core::str` under the `str_internals` unstable feature.
* Remove `std_unicode::str::is_utf16`. It was only accessible through the `#[unstable]` crate std_unicode. It has never been used in the compiler or standard library since 47e7a05 added it in 2012 “for OS API interop”. It can be replaced with a one-liner:
```rust
fn is_utf16(slice: &[u16]) -> bool {
std::char::decode_utf16(s).all(|r| r.is_ok())
}
```
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 8cb7b2bda75..58788cdcd4c 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -256,7 +256,7 @@ #![stable(feature = "rust1", since = "1.0.0")] use cmp; -use std_unicode::str as core_str; +use core::str as core_str; use error as std_error; use fmt; use result; |
