diff --git a/.travis.yml b/.travis.yml index a3adf4d..0ab2eda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,12 @@ language: rust rust: 'nightly' sudo: false script: - - cargo build --verbose --features no_std - - cargo test --verbose --features no_std + - cargo build --verbose --features bench + - cargo test --verbose --features bench + - cargo bench --verbose --features bench - cargo clean - - cargo build --verbose --features default - - cargo test --verbose --features default - - cargo bench --verbose --features default + - cargo build --verbose + - cargo test --verbose - rustdoc --test README.md -L target/debug -L target/debug/deps - cargo doc after_success: | diff --git a/Cargo.toml b/Cargo.toml index aaa0e7d..efe2a3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "unicode-width" -version = "0.1.3" +version = "0.1.4" authors = ["kwantam "] homepage = "https://github.com/unicode-rs/unicode-width" @@ -20,3 +20,4 @@ exclude = [ "target/*", "Cargo.lock" ] [features] default = [] no_std = [] +bench = [] diff --git a/README.md b/README.md index bcc0a46..f5ca529 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ fn main() { ## features -unicode-width supports a `no_std` feature. This eliminates dependence -on std, and instead uses equivalent functions from core. +unicode-width does not depend on libstd, so it can be used in crates +with the `#![no_std]` attribute. ## crates.io @@ -35,5 +35,5 @@ to your `Cargo.toml`: ```toml [dependencies] -unicode-width = "0.1.3" +unicode-width = "0.1.4" ``` diff --git a/scripts/unicode.py b/scripts/unicode.py index 36788bd..203e16a 100755 --- a/scripts/unicode.py +++ b/scripts/unicode.py @@ -199,19 +199,12 @@ def emit_table(f, name, t_data, t_type = "&'static [(char, char)]", is_pub=True, def emit_charwidth_module(f, width_table): f.write("pub mod charwidth {") f.write(""" - #[cfg(feature = "no_std")] use core::option::Option::{self, Some, None}; - #[cfg(feature = "no_std")] - use core::slice::SliceExt; - #[cfg(feature = "no_std")] use core::result::Result::{Ok, Err}; #[inline] fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 { - #[cfg(feature = "no_std")] use core::cmp::Ordering::{Equal, Less, Greater}; - #[cfg(not(feature = "no_std"))] - use std::cmp::Ordering::{Equal, Less, Greater}; match r.binary_search_by(|&(lo, hi, _, _)| { if lo <= c && c <= hi { Equal } else if hi < c { Less } diff --git a/src/lib.rs b/src/lib.rs index bccb3ad..8568fea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,32 +39,27 @@ //! //! ```toml //! [dependencies] -//! unicode-width = "0.1.1" +//! unicode-width = "0.1.4" //! ``` #![deny(missing_docs, unsafe_code)] #![doc(html_logo_url = "https://unicode-rs.github.io/unicode-rs_sm.png", html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png")] -#![cfg_attr(feature = "no_std", no_std)] -#![cfg_attr(feature = "no_std", feature(no_std, core_slice_ext, core_str_ext))] +#![cfg_attr(feature = "bench", feature(test))] +#![no_std] -#![cfg_attr(test, feature(test))] - -#[cfg(all(test, feature = "no_std"))] +#[cfg(test)] #[macro_use] extern crate std; -#[cfg(test)] +#[cfg(feature = "bench")] extern crate test; use tables::charwidth as cw; pub use tables::UNICODE_VERSION; -#[cfg(feature = "no_std")] use core::ops::Add; -#[cfg(not(feature = "no_std"))] -use std::ops::Add; mod tables; diff --git a/src/tables.rs b/src/tables.rs index 449141c..974e037 100644 --- a/src/tables.rs +++ b/src/tables.rs @@ -14,22 +14,15 @@ /// The version of [Unicode](http://www.unicode.org/) /// that this version of unicode-width is based on. -pub const UNICODE_VERSION: (u64, u64, u64) = (8, 0, 0); +pub const UNICODE_VERSION: (u64, u64, u64) = (9, 0, 0); pub mod charwidth { - #[cfg(feature = "no_std")] use core::option::Option::{self, Some, None}; - #[cfg(feature = "no_std")] - use core::slice::SliceExt; - #[cfg(feature = "no_std")] use core::result::Result::{Ok, Err}; #[inline] fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 { - #[cfg(feature = "no_std")] use core::cmp::Ordering::{Equal, Less, Greater}; - #[cfg(not(feature = "no_std"))] - use std::cmp::Ordering::{Equal, Less, Greater}; match r.binary_search_by(|&(lo, hi, _, _)| { if lo <= c && c <= hi { Equal } else if hi < c { Less } @@ -85,7 +78,7 @@ pub mod charwidth { ('\u{6ea}', '\u{6ed}', 0, 0), ('\u{70f}', '\u{70f}', 0, 0), ('\u{711}', '\u{711}', 0, 0), ('\u{730}', '\u{74a}', 0, 0), ('\u{7a6}', '\u{7b0}', 0, 0), ('\u{7eb}', '\u{7f3}', 0, 0), ('\u{816}', '\u{819}', 0, 0), ('\u{81b}', '\u{823}', 0, 0), ('\u{825}', '\u{827}', 0, 0), - ('\u{829}', '\u{82d}', 0, 0), ('\u{859}', '\u{85b}', 0, 0), ('\u{8e3}', '\u{902}', 0, 0), + ('\u{829}', '\u{82d}', 0, 0), ('\u{859}', '\u{85b}', 0, 0), ('\u{8d4}', '\u{902}', 0, 0), ('\u{93a}', '\u{93a}', 0, 0), ('\u{93c}', '\u{93c}', 0, 0), ('\u{941}', '\u{948}', 0, 0), ('\u{94d}', '\u{94d}', 0, 0), ('\u{951}', '\u{957}', 0, 0), ('\u{962}', '\u{963}', 0, 0), ('\u{981}', '\u{981}', 0, 0), ('\u{9bc}', '\u{9bc}', 0, 0), ('\u{9c1}', '\u{9c4}', 0, 0), @@ -118,120 +111,156 @@ pub mod charwidth { 0), ('\u{1732}', '\u{1734}', 0, 0), ('\u{1752}', '\u{1753}', 0, 0), ('\u{1772}', '\u{1773}', 0, 0), ('\u{17b4}', '\u{17b5}', 0, 0), ('\u{17b7}', '\u{17bd}', 0, 0), ('\u{17c6}', '\u{17c6}', 0, 0), ('\u{17c9}', '\u{17d3}', 0, 0), ('\u{17dd}', '\u{17dd}', 0, 0), - ('\u{180b}', '\u{180e}', 0, 0), ('\u{18a9}', '\u{18a9}', 0, 0), ('\u{1920}', '\u{1922}', 0, - 0), ('\u{1927}', '\u{1928}', 0, 0), ('\u{1932}', '\u{1932}', 0, 0), ('\u{1939}', '\u{193b}', - 0, 0), ('\u{1a17}', '\u{1a18}', 0, 0), ('\u{1a1b}', '\u{1a1b}', 0, 0), ('\u{1a56}', - '\u{1a56}', 0, 0), ('\u{1a58}', '\u{1a5e}', 0, 0), ('\u{1a60}', '\u{1a60}', 0, 0), - ('\u{1a62}', '\u{1a62}', 0, 0), ('\u{1a65}', '\u{1a6c}', 0, 0), ('\u{1a73}', '\u{1a7c}', 0, - 0), ('\u{1a7f}', '\u{1a7f}', 0, 0), ('\u{1ab0}', '\u{1abe}', 0, 0), ('\u{1b00}', '\u{1b03}', - 0, 0), ('\u{1b34}', '\u{1b34}', 0, 0), ('\u{1b36}', '\u{1b3a}', 0, 0), ('\u{1b3c}', - '\u{1b3c}', 0, 0), ('\u{1b42}', '\u{1b42}', 0, 0), ('\u{1b6b}', '\u{1b73}', 0, 0), - ('\u{1b80}', '\u{1b81}', 0, 0), ('\u{1ba2}', '\u{1ba5}', 0, 0), ('\u{1ba8}', '\u{1ba9}', 0, - 0), ('\u{1bab}', '\u{1bad}', 0, 0), ('\u{1be6}', '\u{1be6}', 0, 0), ('\u{1be8}', '\u{1be9}', - 0, 0), ('\u{1bed}', '\u{1bed}', 0, 0), ('\u{1bef}', '\u{1bf1}', 0, 0), ('\u{1c2c}', - '\u{1c33}', 0, 0), ('\u{1c36}', '\u{1c37}', 0, 0), ('\u{1cd0}', '\u{1cd2}', 0, 0), - ('\u{1cd4}', '\u{1ce0}', 0, 0), ('\u{1ce2}', '\u{1ce8}', 0, 0), ('\u{1ced}', '\u{1ced}', 0, - 0), ('\u{1cf4}', '\u{1cf4}', 0, 0), ('\u{1cf8}', '\u{1cf9}', 0, 0), ('\u{1dc0}', '\u{1df5}', - 0, 0), ('\u{1dfc}', '\u{1dff}', 0, 0), ('\u{200b}', '\u{200f}', 0, 0), ('\u{2010}', - '\u{2010}', 1, 2), ('\u{2013}', '\u{2016}', 1, 2), ('\u{2018}', '\u{2019}', 1, 2), - ('\u{201c}', '\u{201d}', 1, 2), ('\u{2020}', '\u{2022}', 1, 2), ('\u{2024}', '\u{2027}', 1, - 2), ('\u{202a}', '\u{202e}', 0, 0), ('\u{2030}', '\u{2030}', 1, 2), ('\u{2032}', '\u{2033}', - 1, 2), ('\u{2035}', '\u{2035}', 1, 2), ('\u{203b}', '\u{203b}', 1, 2), ('\u{203e}', - '\u{203e}', 1, 2), ('\u{2060}', '\u{2064}', 0, 0), ('\u{2066}', '\u{206f}', 0, 0), - ('\u{2074}', '\u{2074}', 1, 2), ('\u{207f}', '\u{207f}', 1, 2), ('\u{2081}', '\u{2084}', 1, - 2), ('\u{20ac}', '\u{20ac}', 1, 2), ('\u{20d0}', '\u{20f0}', 0, 0), ('\u{2103}', '\u{2103}', - 1, 2), ('\u{2105}', '\u{2105}', 1, 2), ('\u{2109}', '\u{2109}', 1, 2), ('\u{2113}', - '\u{2113}', 1, 2), ('\u{2116}', '\u{2116}', 1, 2), ('\u{2121}', '\u{2122}', 1, 2), - ('\u{2126}', '\u{2126}', 1, 2), ('\u{212b}', '\u{212b}', 1, 2), ('\u{2153}', '\u{2154}', 1, - 2), ('\u{215b}', '\u{215e}', 1, 2), ('\u{2160}', '\u{216b}', 1, 2), ('\u{2170}', '\u{2179}', - 1, 2), ('\u{2189}', '\u{2189}', 1, 2), ('\u{2190}', '\u{2199}', 1, 2), ('\u{21b8}', - '\u{21b9}', 1, 2), ('\u{21d2}', '\u{21d2}', 1, 2), ('\u{21d4}', '\u{21d4}', 1, 2), - ('\u{21e7}', '\u{21e7}', 1, 2), ('\u{2200}', '\u{2200}', 1, 2), ('\u{2202}', '\u{2203}', 1, - 2), ('\u{2207}', '\u{2208}', 1, 2), ('\u{220b}', '\u{220b}', 1, 2), ('\u{220f}', '\u{220f}', - 1, 2), ('\u{2211}', '\u{2211}', 1, 2), ('\u{2215}', '\u{2215}', 1, 2), ('\u{221a}', - '\u{221a}', 1, 2), ('\u{221d}', '\u{2220}', 1, 2), ('\u{2223}', '\u{2223}', 1, 2), - ('\u{2225}', '\u{2225}', 1, 2), ('\u{2227}', '\u{222c}', 1, 2), ('\u{222e}', '\u{222e}', 1, - 2), ('\u{2234}', '\u{2237}', 1, 2), ('\u{223c}', '\u{223d}', 1, 2), ('\u{2248}', '\u{2248}', - 1, 2), ('\u{224c}', '\u{224c}', 1, 2), ('\u{2252}', '\u{2252}', 1, 2), ('\u{2260}', - '\u{2261}', 1, 2), ('\u{2264}', '\u{2267}', 1, 2), ('\u{226a}', '\u{226b}', 1, 2), - ('\u{226e}', '\u{226f}', 1, 2), ('\u{2282}', '\u{2283}', 1, 2), ('\u{2286}', '\u{2287}', 1, - 2), ('\u{2295}', '\u{2295}', 1, 2), ('\u{2299}', '\u{2299}', 1, 2), ('\u{22a5}', '\u{22a5}', - 1, 2), ('\u{22bf}', '\u{22bf}', 1, 2), ('\u{2312}', '\u{2312}', 1, 2), ('\u{2329}', - '\u{232a}', 2, 2), ('\u{2460}', '\u{24e9}', 1, 2), ('\u{24eb}', '\u{254b}', 1, 2), - ('\u{2550}', '\u{2573}', 1, 2), ('\u{2580}', '\u{258f}', 1, 2), ('\u{2592}', '\u{2595}', 1, - 2), ('\u{25a0}', '\u{25a1}', 1, 2), ('\u{25a3}', '\u{25a9}', 1, 2), ('\u{25b2}', '\u{25b3}', - 1, 2), ('\u{25b6}', '\u{25b7}', 1, 2), ('\u{25bc}', '\u{25bd}', 1, 2), ('\u{25c0}', - '\u{25c1}', 1, 2), ('\u{25c6}', '\u{25c8}', 1, 2), ('\u{25cb}', '\u{25cb}', 1, 2), - ('\u{25ce}', '\u{25d1}', 1, 2), ('\u{25e2}', '\u{25e5}', 1, 2), ('\u{25ef}', '\u{25ef}', 1, - 2), ('\u{2605}', '\u{2606}', 1, 2), ('\u{2609}', '\u{2609}', 1, 2), ('\u{260e}', '\u{260f}', - 1, 2), ('\u{2614}', '\u{2615}', 1, 2), ('\u{261c}', '\u{261c}', 1, 2), ('\u{261e}', - '\u{261e}', 1, 2), ('\u{2640}', '\u{2640}', 1, 2), ('\u{2642}', '\u{2642}', 1, 2), - ('\u{2660}', '\u{2661}', 1, 2), ('\u{2663}', '\u{2665}', 1, 2), ('\u{2667}', '\u{266a}', 1, - 2), ('\u{266c}', '\u{266d}', 1, 2), ('\u{266f}', '\u{266f}', 1, 2), ('\u{269e}', '\u{269f}', - 1, 2), ('\u{26be}', '\u{26bf}', 1, 2), ('\u{26c4}', '\u{26cd}', 1, 2), ('\u{26cf}', - '\u{26e1}', 1, 2), ('\u{26e3}', '\u{26e3}', 1, 2), ('\u{26e8}', '\u{26ff}', 1, 2), - ('\u{273d}', '\u{273d}', 1, 2), ('\u{2757}', '\u{2757}', 1, 2), ('\u{2776}', '\u{277f}', 1, - 2), ('\u{2b55}', '\u{2b59}', 1, 2), ('\u{2cef}', '\u{2cf1}', 0, 0), ('\u{2d7f}', '\u{2d7f}', - 0, 0), ('\u{2de0}', '\u{2dff}', 0, 0), ('\u{2e80}', '\u{2e99}', 2, 2), ('\u{2e9b}', - '\u{2ef3}', 2, 2), ('\u{2f00}', '\u{2fd5}', 2, 2), ('\u{2ff0}', '\u{2ffb}', 2, 2), - ('\u{3000}', '\u{3029}', 2, 2), ('\u{302a}', '\u{302d}', 0, 0), ('\u{302e}', '\u{303e}', 2, - 2), ('\u{3041}', '\u{3096}', 2, 2), ('\u{3099}', '\u{309a}', 0, 0), ('\u{309b}', '\u{30ff}', - 2, 2), ('\u{3105}', '\u{312d}', 2, 2), ('\u{3131}', '\u{318e}', 2, 2), ('\u{3190}', - '\u{31ba}', 2, 2), ('\u{31c0}', '\u{31e3}', 2, 2), ('\u{31f0}', '\u{321e}', 2, 2), - ('\u{3220}', '\u{3247}', 2, 2), ('\u{3248}', '\u{324f}', 1, 2), ('\u{3250}', '\u{32fe}', 2, - 2), ('\u{3300}', '\u{4dbf}', 2, 2), ('\u{4e00}', '\u{a48c}', 2, 2), ('\u{a490}', '\u{a4c6}', - 2, 2), ('\u{a66f}', '\u{a672}', 0, 0), ('\u{a674}', '\u{a67d}', 0, 0), ('\u{a69e}', - '\u{a69f}', 0, 0), ('\u{a6f0}', '\u{a6f1}', 0, 0), ('\u{a802}', '\u{a802}', 0, 0), - ('\u{a806}', '\u{a806}', 0, 0), ('\u{a80b}', '\u{a80b}', 0, 0), ('\u{a825}', '\u{a826}', 0, - 0), ('\u{a8c4}', '\u{a8c4}', 0, 0), ('\u{a8e0}', '\u{a8f1}', 0, 0), ('\u{a926}', '\u{a92d}', - 0, 0), ('\u{a947}', '\u{a951}', 0, 0), ('\u{a960}', '\u{a97c}', 2, 2), ('\u{a980}', - '\u{a982}', 0, 0), ('\u{a9b3}', '\u{a9b3}', 0, 0), ('\u{a9b6}', '\u{a9b9}', 0, 0), - ('\u{a9bc}', '\u{a9bc}', 0, 0), ('\u{a9e5}', '\u{a9e5}', 0, 0), ('\u{aa29}', '\u{aa2e}', 0, - 0), ('\u{aa31}', '\u{aa32}', 0, 0), ('\u{aa35}', '\u{aa36}', 0, 0), ('\u{aa43}', '\u{aa43}', - 0, 0), ('\u{aa4c}', '\u{aa4c}', 0, 0), ('\u{aa7c}', '\u{aa7c}', 0, 0), ('\u{aab0}', - '\u{aab0}', 0, 0), ('\u{aab2}', '\u{aab4}', 0, 0), ('\u{aab7}', '\u{aab8}', 0, 0), - ('\u{aabe}', '\u{aabf}', 0, 0), ('\u{aac1}', '\u{aac1}', 0, 0), ('\u{aaec}', '\u{aaed}', 0, - 0), ('\u{aaf6}', '\u{aaf6}', 0, 0), ('\u{abe5}', '\u{abe5}', 0, 0), ('\u{abe8}', '\u{abe8}', - 0, 0), ('\u{abed}', '\u{abed}', 0, 0), ('\u{ac00}', '\u{d7a3}', 2, 2), ('\u{e000}', - '\u{f8ff}', 1, 2), ('\u{f900}', '\u{faff}', 2, 2), ('\u{fb1e}', '\u{fb1e}', 0, 0), - ('\u{fe00}', '\u{fe0f}', 0, 0), ('\u{fe10}', '\u{fe19}', 2, 2), ('\u{fe20}', '\u{fe2f}', 0, - 0), ('\u{fe30}', '\u{fe52}', 2, 2), ('\u{fe54}', '\u{fe66}', 2, 2), ('\u{fe68}', '\u{fe6b}', - 2, 2), ('\u{feff}', '\u{feff}', 0, 0), ('\u{ff01}', '\u{ff60}', 2, 2), ('\u{ffe0}', - '\u{ffe6}', 2, 2), ('\u{fff9}', '\u{fffb}', 0, 0), ('\u{fffd}', '\u{fffd}', 1, 2), - ('\u{101fd}', '\u{101fd}', 0, 0), ('\u{102e0}', '\u{102e0}', 0, 0), ('\u{10376}', - '\u{1037a}', 0, 0), ('\u{10a01}', '\u{10a03}', 0, 0), ('\u{10a05}', '\u{10a06}', 0, 0), - ('\u{10a0c}', '\u{10a0f}', 0, 0), ('\u{10a38}', '\u{10a3a}', 0, 0), ('\u{10a3f}', - '\u{10a3f}', 0, 0), ('\u{10ae5}', '\u{10ae6}', 0, 0), ('\u{11001}', '\u{11001}', 0, 0), - ('\u{11038}', '\u{11046}', 0, 0), ('\u{1107f}', '\u{11081}', 0, 0), ('\u{110b3}', - '\u{110b6}', 0, 0), ('\u{110b9}', '\u{110ba}', 0, 0), ('\u{110bd}', '\u{110bd}', 0, 0), - ('\u{11100}', '\u{11102}', 0, 0), ('\u{11127}', '\u{1112b}', 0, 0), ('\u{1112d}', - '\u{11134}', 0, 0), ('\u{11173}', '\u{11173}', 0, 0), ('\u{11180}', '\u{11181}', 0, 0), - ('\u{111b6}', '\u{111be}', 0, 0), ('\u{111ca}', '\u{111cc}', 0, 0), ('\u{1122f}', - '\u{11231}', 0, 0), ('\u{11234}', '\u{11234}', 0, 0), ('\u{11236}', '\u{11237}', 0, 0), - ('\u{112df}', '\u{112df}', 0, 0), ('\u{112e3}', '\u{112ea}', 0, 0), ('\u{11300}', - '\u{11301}', 0, 0), ('\u{1133c}', '\u{1133c}', 0, 0), ('\u{11340}', '\u{11340}', 0, 0), - ('\u{11366}', '\u{1136c}', 0, 0), ('\u{11370}', '\u{11374}', 0, 0), ('\u{114b3}', - '\u{114b8}', 0, 0), ('\u{114ba}', '\u{114ba}', 0, 0), ('\u{114bf}', '\u{114c0}', 0, 0), - ('\u{114c2}', '\u{114c3}', 0, 0), ('\u{115b2}', '\u{115b5}', 0, 0), ('\u{115bc}', - '\u{115bd}', 0, 0), ('\u{115bf}', '\u{115c0}', 0, 0), ('\u{115dc}', '\u{115dd}', 0, 0), - ('\u{11633}', '\u{1163a}', 0, 0), ('\u{1163d}', '\u{1163d}', 0, 0), ('\u{1163f}', - '\u{11640}', 0, 0), ('\u{116ab}', '\u{116ab}', 0, 0), ('\u{116ad}', '\u{116ad}', 0, 0), - ('\u{116b0}', '\u{116b5}', 0, 0), ('\u{116b7}', '\u{116b7}', 0, 0), ('\u{1171d}', - '\u{1171f}', 0, 0), ('\u{11722}', '\u{11725}', 0, 0), ('\u{11727}', '\u{1172b}', 0, 0), - ('\u{16af0}', '\u{16af4}', 0, 0), ('\u{16b30}', '\u{16b36}', 0, 0), ('\u{16f8f}', - '\u{16f92}', 0, 0), ('\u{1b000}', '\u{1b001}', 2, 2), ('\u{1bc9d}', '\u{1bc9e}', 0, 0), - ('\u{1bca0}', '\u{1bca3}', 0, 0), ('\u{1d167}', '\u{1d169}', 0, 0), ('\u{1d173}', - '\u{1d182}', 0, 0), ('\u{1d185}', '\u{1d18b}', 0, 0), ('\u{1d1aa}', '\u{1d1ad}', 0, 0), - ('\u{1d242}', '\u{1d244}', 0, 0), ('\u{1da00}', '\u{1da36}', 0, 0), ('\u{1da3b}', - '\u{1da6c}', 0, 0), ('\u{1da75}', '\u{1da75}', 0, 0), ('\u{1da84}', '\u{1da84}', 0, 0), - ('\u{1da9b}', '\u{1da9f}', 0, 0), ('\u{1daa1}', '\u{1daaf}', 0, 0), ('\u{1e8d0}', - '\u{1e8d6}', 0, 0), ('\u{1f100}', '\u{1f10a}', 1, 2), ('\u{1f110}', '\u{1f12d}', 1, 2), - ('\u{1f130}', '\u{1f169}', 1, 2), ('\u{1f170}', '\u{1f19a}', 1, 2), ('\u{1f200}', - '\u{1f202}', 2, 2), ('\u{1f210}', '\u{1f23a}', 2, 2), ('\u{1f240}', '\u{1f248}', 2, 2), - ('\u{1f250}', '\u{1f251}', 2, 2), ('\u{20000}', '\u{2fffd}', 2, 2), ('\u{30000}', - '\u{3fffd}', 2, 2), ('\u{e0001}', '\u{e0001}', 0, 0), ('\u{e0020}', '\u{e007f}', 0, 0), - ('\u{e0100}', '\u{e01ef}', 0, 0), ('\u{f0000}', '\u{ffffd}', 1, 2), ('\u{100000}', - '\u{10fffd}', 1, 2) + ('\u{180b}', '\u{180e}', 0, 0), ('\u{1885}', '\u{1886}', 0, 0), ('\u{18a9}', '\u{18a9}', 0, + 0), ('\u{1920}', '\u{1922}', 0, 0), ('\u{1927}', '\u{1928}', 0, 0), ('\u{1932}', '\u{1932}', + 0, 0), ('\u{1939}', '\u{193b}', 0, 0), ('\u{1a17}', '\u{1a18}', 0, 0), ('\u{1a1b}', + '\u{1a1b}', 0, 0), ('\u{1a56}', '\u{1a56}', 0, 0), ('\u{1a58}', '\u{1a5e}', 0, 0), + ('\u{1a60}', '\u{1a60}', 0, 0), ('\u{1a62}', '\u{1a62}', 0, 0), ('\u{1a65}', '\u{1a6c}', 0, + 0), ('\u{1a73}', '\u{1a7c}', 0, 0), ('\u{1a7f}', '\u{1a7f}', 0, 0), ('\u{1ab0}', '\u{1abe}', + 0, 0), ('\u{1b00}', '\u{1b03}', 0, 0), ('\u{1b34}', '\u{1b34}', 0, 0), ('\u{1b36}', + '\u{1b3a}', 0, 0), ('\u{1b3c}', '\u{1b3c}', 0, 0), ('\u{1b42}', '\u{1b42}', 0, 0), + ('\u{1b6b}', '\u{1b73}', 0, 0), ('\u{1b80}', '\u{1b81}', 0, 0), ('\u{1ba2}', '\u{1ba5}', 0, + 0), ('\u{1ba8}', '\u{1ba9}', 0, 0), ('\u{1bab}', '\u{1bad}', 0, 0), ('\u{1be6}', '\u{1be6}', + 0, 0), ('\u{1be8}', '\u{1be9}', 0, 0), ('\u{1bed}', '\u{1bed}', 0, 0), ('\u{1bef}', + '\u{1bf1}', 0, 0), ('\u{1c2c}', '\u{1c33}', 0, 0), ('\u{1c36}', '\u{1c37}', 0, 0), + ('\u{1cd0}', '\u{1cd2}', 0, 0), ('\u{1cd4}', '\u{1ce0}', 0, 0), ('\u{1ce2}', '\u{1ce8}', 0, + 0), ('\u{1ced}', '\u{1ced}', 0, 0), ('\u{1cf4}', '\u{1cf4}', 0, 0), ('\u{1cf8}', '\u{1cf9}', + 0, 0), ('\u{1dc0}', '\u{1df5}', 0, 0), ('\u{1dfb}', '\u{1dff}', 0, 0), ('\u{200b}', + '\u{200f}', 0, 0), ('\u{2010}', '\u{2010}', 1, 2), ('\u{2013}', '\u{2016}', 1, 2), + ('\u{2018}', '\u{2019}', 1, 2), ('\u{201c}', '\u{201d}', 1, 2), ('\u{2020}', '\u{2022}', 1, + 2), ('\u{2024}', '\u{2027}', 1, 2), ('\u{202a}', '\u{202e}', 0, 0), ('\u{2030}', '\u{2030}', + 1, 2), ('\u{2032}', '\u{2033}', 1, 2), ('\u{2035}', '\u{2035}', 1, 2), ('\u{203b}', + '\u{203b}', 1, 2), ('\u{203e}', '\u{203e}', 1, 2), ('\u{2060}', '\u{2064}', 0, 0), + ('\u{2066}', '\u{206f}', 0, 0), ('\u{2074}', '\u{2074}', 1, 2), ('\u{207f}', '\u{207f}', 1, + 2), ('\u{2081}', '\u{2084}', 1, 2), ('\u{20ac}', '\u{20ac}', 1, 2), ('\u{20d0}', '\u{20f0}', + 0, 0), ('\u{2103}', '\u{2103}', 1, 2), ('\u{2105}', '\u{2105}', 1, 2), ('\u{2109}', + '\u{2109}', 1, 2), ('\u{2113}', '\u{2113}', 1, 2), ('\u{2116}', '\u{2116}', 1, 2), + ('\u{2121}', '\u{2122}', 1, 2), ('\u{2126}', '\u{2126}', 1, 2), ('\u{212b}', '\u{212b}', 1, + 2), ('\u{2153}', '\u{2154}', 1, 2), ('\u{215b}', '\u{215e}', 1, 2), ('\u{2160}', '\u{216b}', + 1, 2), ('\u{2170}', '\u{2179}', 1, 2), ('\u{2189}', '\u{2189}', 1, 2), ('\u{2190}', + '\u{2199}', 1, 2), ('\u{21b8}', '\u{21b9}', 1, 2), ('\u{21d2}', '\u{21d2}', 1, 2), + ('\u{21d4}', '\u{21d4}', 1, 2), ('\u{21e7}', '\u{21e7}', 1, 2), ('\u{2200}', '\u{2200}', 1, + 2), ('\u{2202}', '\u{2203}', 1, 2), ('\u{2207}', '\u{2208}', 1, 2), ('\u{220b}', '\u{220b}', + 1, 2), ('\u{220f}', '\u{220f}', 1, 2), ('\u{2211}', '\u{2211}', 1, 2), ('\u{2215}', + '\u{2215}', 1, 2), ('\u{221a}', '\u{221a}', 1, 2), ('\u{221d}', '\u{2220}', 1, 2), + ('\u{2223}', '\u{2223}', 1, 2), ('\u{2225}', '\u{2225}', 1, 2), ('\u{2227}', '\u{222c}', 1, + 2), ('\u{222e}', '\u{222e}', 1, 2), ('\u{2234}', '\u{2237}', 1, 2), ('\u{223c}', '\u{223d}', + 1, 2), ('\u{2248}', '\u{2248}', 1, 2), ('\u{224c}', '\u{224c}', 1, 2), ('\u{2252}', + '\u{2252}', 1, 2), ('\u{2260}', '\u{2261}', 1, 2), ('\u{2264}', '\u{2267}', 1, 2), + ('\u{226a}', '\u{226b}', 1, 2), ('\u{226e}', '\u{226f}', 1, 2), ('\u{2282}', '\u{2283}', 1, + 2), ('\u{2286}', '\u{2287}', 1, 2), ('\u{2295}', '\u{2295}', 1, 2), ('\u{2299}', '\u{2299}', + 1, 2), ('\u{22a5}', '\u{22a5}', 1, 2), ('\u{22bf}', '\u{22bf}', 1, 2), ('\u{2312}', + '\u{2312}', 1, 2), ('\u{231a}', '\u{231b}', 2, 2), ('\u{2329}', '\u{232a}', 2, 2), + ('\u{23e9}', '\u{23ec}', 2, 2), ('\u{23f0}', '\u{23f0}', 2, 2), ('\u{23f3}', '\u{23f3}', 2, + 2), ('\u{2460}', '\u{24e9}', 1, 2), ('\u{24eb}', '\u{254b}', 1, 2), ('\u{2550}', '\u{2573}', + 1, 2), ('\u{2580}', '\u{258f}', 1, 2), ('\u{2592}', '\u{2595}', 1, 2), ('\u{25a0}', + '\u{25a1}', 1, 2), ('\u{25a3}', '\u{25a9}', 1, 2), ('\u{25b2}', '\u{25b3}', 1, 2), + ('\u{25b6}', '\u{25b7}', 1, 2), ('\u{25bc}', '\u{25bd}', 1, 2), ('\u{25c0}', '\u{25c1}', 1, + 2), ('\u{25c6}', '\u{25c8}', 1, 2), ('\u{25cb}', '\u{25cb}', 1, 2), ('\u{25ce}', '\u{25d1}', + 1, 2), ('\u{25e2}', '\u{25e5}', 1, 2), ('\u{25ef}', '\u{25ef}', 1, 2), ('\u{25fd}', + '\u{25fe}', 2, 2), ('\u{2605}', '\u{2606}', 1, 2), ('\u{2609}', '\u{2609}', 1, 2), + ('\u{260e}', '\u{260f}', 1, 2), ('\u{2614}', '\u{2615}', 2, 2), ('\u{261c}', '\u{261c}', 1, + 2), ('\u{261e}', '\u{261e}', 1, 2), ('\u{2640}', '\u{2640}', 1, 2), ('\u{2642}', '\u{2642}', + 1, 2), ('\u{2648}', '\u{2653}', 2, 2), ('\u{2660}', '\u{2661}', 1, 2), ('\u{2663}', + '\u{2665}', 1, 2), ('\u{2667}', '\u{266a}', 1, 2), ('\u{266c}', '\u{266d}', 1, 2), + ('\u{266f}', '\u{266f}', 1, 2), ('\u{267f}', '\u{267f}', 2, 2), ('\u{2693}', '\u{2693}', 2, + 2), ('\u{269e}', '\u{269f}', 1, 2), ('\u{26a1}', '\u{26a1}', 2, 2), ('\u{26aa}', '\u{26ab}', + 2, 2), ('\u{26bd}', '\u{26be}', 2, 2), ('\u{26bf}', '\u{26bf}', 1, 2), ('\u{26c4}', + '\u{26c5}', 2, 2), ('\u{26c6}', '\u{26cd}', 1, 2), ('\u{26ce}', '\u{26ce}', 2, 2), + ('\u{26cf}', '\u{26d3}', 1, 2), ('\u{26d4}', '\u{26d4}', 2, 2), ('\u{26d5}', '\u{26e1}', 1, + 2), ('\u{26e3}', '\u{26e3}', 1, 2), ('\u{26e8}', '\u{26e9}', 1, 2), ('\u{26ea}', '\u{26ea}', + 2, 2), ('\u{26eb}', '\u{26f1}', 1, 2), ('\u{26f2}', '\u{26f3}', 2, 2), ('\u{26f4}', + '\u{26f4}', 1, 2), ('\u{26f5}', '\u{26f5}', 2, 2), ('\u{26f6}', '\u{26f9}', 1, 2), + ('\u{26fa}', '\u{26fa}', 2, 2), ('\u{26fb}', '\u{26fc}', 1, 2), ('\u{26fd}', '\u{26fd}', 2, + 2), ('\u{26fe}', '\u{26ff}', 1, 2), ('\u{2705}', '\u{2705}', 2, 2), ('\u{270a}', '\u{270b}', + 2, 2), ('\u{2728}', '\u{2728}', 2, 2), ('\u{273d}', '\u{273d}', 1, 2), ('\u{274c}', + '\u{274c}', 2, 2), ('\u{274e}', '\u{274e}', 2, 2), ('\u{2753}', '\u{2755}', 2, 2), + ('\u{2757}', '\u{2757}', 2, 2), ('\u{2776}', '\u{277f}', 1, 2), ('\u{2795}', '\u{2797}', 2, + 2), ('\u{27b0}', '\u{27b0}', 2, 2), ('\u{27bf}', '\u{27bf}', 2, 2), ('\u{2b1b}', '\u{2b1c}', + 2, 2), ('\u{2b50}', '\u{2b50}', 2, 2), ('\u{2b55}', '\u{2b55}', 2, 2), ('\u{2b56}', + '\u{2b59}', 1, 2), ('\u{2cef}', '\u{2cf1}', 0, 0), ('\u{2d7f}', '\u{2d7f}', 0, 0), + ('\u{2de0}', '\u{2dff}', 0, 0), ('\u{2e80}', '\u{2e99}', 2, 2), ('\u{2e9b}', '\u{2ef3}', 2, + 2), ('\u{2f00}', '\u{2fd5}', 2, 2), ('\u{2ff0}', '\u{2ffb}', 2, 2), ('\u{3000}', '\u{3029}', + 2, 2), ('\u{302a}', '\u{302d}', 0, 0), ('\u{302e}', '\u{303e}', 2, 2), ('\u{3041}', + '\u{3096}', 2, 2), ('\u{3099}', '\u{309a}', 0, 0), ('\u{309b}', '\u{30ff}', 2, 2), + ('\u{3105}', '\u{312d}', 2, 2), ('\u{3131}', '\u{318e}', 2, 2), ('\u{3190}', '\u{31ba}', 2, + 2), ('\u{31c0}', '\u{31e3}', 2, 2), ('\u{31f0}', '\u{321e}', 2, 2), ('\u{3220}', '\u{3247}', + 2, 2), ('\u{3248}', '\u{324f}', 1, 2), ('\u{3250}', '\u{32fe}', 2, 2), ('\u{3300}', + '\u{4dbf}', 2, 2), ('\u{4e00}', '\u{a48c}', 2, 2), ('\u{a490}', '\u{a4c6}', 2, 2), + ('\u{a66f}', '\u{a672}', 0, 0), ('\u{a674}', '\u{a67d}', 0, 0), ('\u{a69e}', '\u{a69f}', 0, + 0), ('\u{a6f0}', '\u{a6f1}', 0, 0), ('\u{a802}', '\u{a802}', 0, 0), ('\u{a806}', '\u{a806}', + 0, 0), ('\u{a80b}', '\u{a80b}', 0, 0), ('\u{a825}', '\u{a826}', 0, 0), ('\u{a8c4}', + '\u{a8c5}', 0, 0), ('\u{a8e0}', '\u{a8f1}', 0, 0), ('\u{a926}', '\u{a92d}', 0, 0), + ('\u{a947}', '\u{a951}', 0, 0), ('\u{a960}', '\u{a97c}', 2, 2), ('\u{a980}', '\u{a982}', 0, + 0), ('\u{a9b3}', '\u{a9b3}', 0, 0), ('\u{a9b6}', '\u{a9b9}', 0, 0), ('\u{a9bc}', '\u{a9bc}', + 0, 0), ('\u{a9e5}', '\u{a9e5}', 0, 0), ('\u{aa29}', '\u{aa2e}', 0, 0), ('\u{aa31}', + '\u{aa32}', 0, 0), ('\u{aa35}', '\u{aa36}', 0, 0), ('\u{aa43}', '\u{aa43}', 0, 0), + ('\u{aa4c}', '\u{aa4c}', 0, 0), ('\u{aa7c}', '\u{aa7c}', 0, 0), ('\u{aab0}', '\u{aab0}', 0, + 0), ('\u{aab2}', '\u{aab4}', 0, 0), ('\u{aab7}', '\u{aab8}', 0, 0), ('\u{aabe}', '\u{aabf}', + 0, 0), ('\u{aac1}', '\u{aac1}', 0, 0), ('\u{aaec}', '\u{aaed}', 0, 0), ('\u{aaf6}', + '\u{aaf6}', 0, 0), ('\u{abe5}', '\u{abe5}', 0, 0), ('\u{abe8}', '\u{abe8}', 0, 0), + ('\u{abed}', '\u{abed}', 0, 0), ('\u{ac00}', '\u{d7a3}', 2, 2), ('\u{e000}', '\u{f8ff}', 1, + 2), ('\u{f900}', '\u{faff}', 2, 2), ('\u{fb1e}', '\u{fb1e}', 0, 0), ('\u{fe00}', '\u{fe0f}', + 0, 0), ('\u{fe10}', '\u{fe19}', 2, 2), ('\u{fe20}', '\u{fe2f}', 0, 0), ('\u{fe30}', + '\u{fe52}', 2, 2), ('\u{fe54}', '\u{fe66}', 2, 2), ('\u{fe68}', '\u{fe6b}', 2, 2), + ('\u{feff}', '\u{feff}', 0, 0), ('\u{ff01}', '\u{ff60}', 2, 2), ('\u{ffe0}', '\u{ffe6}', 2, + 2), ('\u{fff9}', '\u{fffb}', 0, 0), ('\u{fffd}', '\u{fffd}', 1, 2), ('\u{101fd}', + '\u{101fd}', 0, 0), ('\u{102e0}', '\u{102e0}', 0, 0), ('\u{10376}', '\u{1037a}', 0, 0), + ('\u{10a01}', '\u{10a03}', 0, 0), ('\u{10a05}', '\u{10a06}', 0, 0), ('\u{10a0c}', + '\u{10a0f}', 0, 0), ('\u{10a38}', '\u{10a3a}', 0, 0), ('\u{10a3f}', '\u{10a3f}', 0, 0), + ('\u{10ae5}', '\u{10ae6}', 0, 0), ('\u{11001}', '\u{11001}', 0, 0), ('\u{11038}', + '\u{11046}', 0, 0), ('\u{1107f}', '\u{11081}', 0, 0), ('\u{110b3}', '\u{110b6}', 0, 0), + ('\u{110b9}', '\u{110ba}', 0, 0), ('\u{110bd}', '\u{110bd}', 0, 0), ('\u{11100}', + '\u{11102}', 0, 0), ('\u{11127}', '\u{1112b}', 0, 0), ('\u{1112d}', '\u{11134}', 0, 0), + ('\u{11173}', '\u{11173}', 0, 0), ('\u{11180}', '\u{11181}', 0, 0), ('\u{111b6}', + '\u{111be}', 0, 0), ('\u{111ca}', '\u{111cc}', 0, 0), ('\u{1122f}', '\u{11231}', 0, 0), + ('\u{11234}', '\u{11234}', 0, 0), ('\u{11236}', '\u{11237}', 0, 0), ('\u{1123e}', + '\u{1123e}', 0, 0), ('\u{112df}', '\u{112df}', 0, 0), ('\u{112e3}', '\u{112ea}', 0, 0), + ('\u{11300}', '\u{11301}', 0, 0), ('\u{1133c}', '\u{1133c}', 0, 0), ('\u{11340}', + '\u{11340}', 0, 0), ('\u{11366}', '\u{1136c}', 0, 0), ('\u{11370}', '\u{11374}', 0, 0), + ('\u{11438}', '\u{1143f}', 0, 0), ('\u{11442}', '\u{11444}', 0, 0), ('\u{11446}', + '\u{11446}', 0, 0), ('\u{114b3}', '\u{114b8}', 0, 0), ('\u{114ba}', '\u{114ba}', 0, 0), + ('\u{114bf}', '\u{114c0}', 0, 0), ('\u{114c2}', '\u{114c3}', 0, 0), ('\u{115b2}', + '\u{115b5}', 0, 0), ('\u{115bc}', '\u{115bd}', 0, 0), ('\u{115bf}', '\u{115c0}', 0, 0), + ('\u{115dc}', '\u{115dd}', 0, 0), ('\u{11633}', '\u{1163a}', 0, 0), ('\u{1163d}', + '\u{1163d}', 0, 0), ('\u{1163f}', '\u{11640}', 0, 0), ('\u{116ab}', '\u{116ab}', 0, 0), + ('\u{116ad}', '\u{116ad}', 0, 0), ('\u{116b0}', '\u{116b5}', 0, 0), ('\u{116b7}', + '\u{116b7}', 0, 0), ('\u{1171d}', '\u{1171f}', 0, 0), ('\u{11722}', '\u{11725}', 0, 0), + ('\u{11727}', '\u{1172b}', 0, 0), ('\u{11c30}', '\u{11c36}', 0, 0), ('\u{11c38}', + '\u{11c3d}', 0, 0), ('\u{11c3f}', '\u{11c3f}', 0, 0), ('\u{11c92}', '\u{11ca7}', 0, 0), + ('\u{11caa}', '\u{11cb0}', 0, 0), ('\u{11cb2}', '\u{11cb3}', 0, 0), ('\u{11cb5}', + '\u{11cb6}', 0, 0), ('\u{16af0}', '\u{16af4}', 0, 0), ('\u{16b30}', '\u{16b36}', 0, 0), + ('\u{16f8f}', '\u{16f92}', 0, 0), ('\u{16fe0}', '\u{16fe0}', 2, 2), ('\u{17000}', + '\u{187ec}', 2, 2), ('\u{18800}', '\u{18af2}', 2, 2), ('\u{1b000}', '\u{1b001}', 2, 2), + ('\u{1bc9d}', '\u{1bc9e}', 0, 0), ('\u{1bca0}', '\u{1bca3}', 0, 0), ('\u{1d167}', + '\u{1d169}', 0, 0), ('\u{1d173}', '\u{1d182}', 0, 0), ('\u{1d185}', '\u{1d18b}', 0, 0), + ('\u{1d1aa}', '\u{1d1ad}', 0, 0), ('\u{1d242}', '\u{1d244}', 0, 0), ('\u{1da00}', + '\u{1da36}', 0, 0), ('\u{1da3b}', '\u{1da6c}', 0, 0), ('\u{1da75}', '\u{1da75}', 0, 0), + ('\u{1da84}', '\u{1da84}', 0, 0), ('\u{1da9b}', '\u{1da9f}', 0, 0), ('\u{1daa1}', + '\u{1daaf}', 0, 0), ('\u{1e000}', '\u{1e006}', 0, 0), ('\u{1e008}', '\u{1e018}', 0, 0), + ('\u{1e01b}', '\u{1e021}', 0, 0), ('\u{1e023}', '\u{1e024}', 0, 0), ('\u{1e026}', + '\u{1e02a}', 0, 0), ('\u{1e8d0}', '\u{1e8d6}', 0, 0), ('\u{1e944}', '\u{1e94a}', 0, 0), + ('\u{1f004}', '\u{1f004}', 2, 2), ('\u{1f0cf}', '\u{1f0cf}', 2, 2), ('\u{1f100}', + '\u{1f10a}', 1, 2), ('\u{1f110}', '\u{1f12d}', 1, 2), ('\u{1f130}', '\u{1f169}', 1, 2), + ('\u{1f170}', '\u{1f18d}', 1, 2), ('\u{1f18e}', '\u{1f18e}', 2, 2), ('\u{1f18f}', + '\u{1f190}', 1, 2), ('\u{1f191}', '\u{1f19a}', 2, 2), ('\u{1f19b}', '\u{1f1ac}', 1, 2), + ('\u{1f200}', '\u{1f202}', 2, 2), ('\u{1f210}', '\u{1f23b}', 2, 2), ('\u{1f240}', + '\u{1f248}', 2, 2), ('\u{1f250}', '\u{1f251}', 2, 2), ('\u{1f300}', '\u{1f320}', 2, 2), + ('\u{1f32d}', '\u{1f335}', 2, 2), ('\u{1f337}', '\u{1f37c}', 2, 2), ('\u{1f37e}', + '\u{1f393}', 2, 2), ('\u{1f3a0}', '\u{1f3ca}', 2, 2), ('\u{1f3cf}', '\u{1f3d3}', 2, 2), + ('\u{1f3e0}', '\u{1f3f0}', 2, 2), ('\u{1f3f4}', '\u{1f3f4}', 2, 2), ('\u{1f3f8}', + '\u{1f43e}', 2, 2), ('\u{1f440}', '\u{1f440}', 2, 2), ('\u{1f442}', '\u{1f4fc}', 2, 2), + ('\u{1f4ff}', '\u{1f53d}', 2, 2), ('\u{1f54b}', '\u{1f54e}', 2, 2), ('\u{1f550}', + '\u{1f567}', 2, 2), ('\u{1f57a}', '\u{1f57a}', 2, 2), ('\u{1f595}', '\u{1f596}', 2, 2), + ('\u{1f5a4}', '\u{1f5a4}', 2, 2), ('\u{1f5fb}', '\u{1f64f}', 2, 2), ('\u{1f680}', + '\u{1f6c5}', 2, 2), ('\u{1f6cc}', '\u{1f6cc}', 2, 2), ('\u{1f6d0}', '\u{1f6d2}', 2, 2), + ('\u{1f6eb}', '\u{1f6ec}', 2, 2), ('\u{1f6f4}', '\u{1f6f6}', 2, 2), ('\u{1f910}', + '\u{1f91e}', 2, 2), ('\u{1f920}', '\u{1f927}', 2, 2), ('\u{1f930}', '\u{1f930}', 2, 2), + ('\u{1f933}', '\u{1f93e}', 2, 2), ('\u{1f940}', '\u{1f94b}', 2, 2), ('\u{1f950}', + '\u{1f95e}', 2, 2), ('\u{1f980}', '\u{1f991}', 2, 2), ('\u{1f9c0}', '\u{1f9c0}', 2, 2), + ('\u{20000}', '\u{2fffd}', 2, 2), ('\u{30000}', '\u{3fffd}', 2, 2), ('\u{e0001}', + '\u{e0001}', 0, 0), ('\u{e0020}', '\u{e007f}', 0, 0), ('\u{e0100}', '\u{e01ef}', 0, 0), + ('\u{f0000}', '\u{ffffd}', 1, 2), ('\u{100000}', '\u{10fffd}', 1, 2) ]; } diff --git a/src/tests.rs b/src/tests.rs index 490405b..2ba1e23 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -8,14 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[cfg(feature = "bench")] use std::iter; +#[cfg(feature = "bench")] use test::{self, Bencher}; - +#[cfg(feature = "bench")] use super::UnicodeWidthChar; -#[cfg(feature = "no_std")] use std::prelude::v1::*; +#[cfg(feature = "bench")] #[bench] fn cargo(b: &mut Bencher) { let string = iter::repeat('a').take(4096).collect::(); @@ -27,6 +29,7 @@ fn cargo(b: &mut Bencher) { }); } +#[cfg(feature = "bench")] #[bench] #[allow(deprecated)] fn stdlib(b: &mut Bencher) { @@ -39,6 +42,7 @@ fn stdlib(b: &mut Bencher) { }); } +#[cfg(feature = "bench")] #[bench] fn simple_if(b: &mut Bencher) { let string = iter::repeat('a').take(4096).collect::(); @@ -50,6 +54,7 @@ fn simple_if(b: &mut Bencher) { }); } +#[cfg(feature = "bench")] #[bench] fn simple_match(b: &mut Bencher) { let string = iter::repeat('a').take(4096).collect::(); @@ -61,6 +66,7 @@ fn simple_match(b: &mut Bencher) { }); } +#[cfg(feature = "bench")] #[inline] fn simple_width_if(c: char) -> Option { let cu = c as u32; @@ -77,6 +83,7 @@ fn simple_width_if(c: char) -> Option { } } +#[cfg(feature = "bench")] #[inline] fn simple_width_match(c: char) -> Option { match c as u32 {