From 8165b1c1170452c4feda01db8f15f569e88a884a Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 08:10:50 -0800 Subject: [PATCH 1/6] unic/bidi/benches: Update source data path to /external/ --- unic/bidi/benches/bidi_udhr_benches.rs | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/unic/bidi/benches/bidi_udhr_benches.rs b/unic/bidi/benches/bidi_udhr_benches.rs index cf5fa1b8..c7ab176f 100644 --- a/unic/bidi/benches/bidi_udhr_benches.rs +++ b/unic/bidi/benches/bidi_udhr_benches.rs @@ -20,33 +20,33 @@ use test::Bencher; use unic_bidi::BidiInfo; const LTR_TEXTS: &[&str] = &[ - include_str!("../../../data/udhr/txt/udhr_acu_1.txt"), - include_str!("../../../data/udhr/txt/udhr_auc.txt"), - include_str!("../../../data/udhr/txt/udhr_eng.txt"), - include_str!("../../../data/udhr/txt/udhr_knc.txt"), - include_str!("../../../data/udhr/txt/udhr_krl.txt"), - include_str!("../../../data/udhr/txt/udhr_lot.txt"), - include_str!("../../../data/udhr/txt/udhr_mly_latn.txt"), - include_str!("../../../data/udhr/txt/udhr_piu.txt"), - include_str!("../../../data/udhr/txt/udhr_qug.txt"), - include_str!("../../../data/udhr/txt/udhr_snn.txt"), - include_str!("../../../data/udhr/txt/udhr_tiv.txt"), - include_str!("../../../data/udhr/txt/udhr_uig_latn.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_acu_1.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_auc.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_eng.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_knc.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_krl.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_lot.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_mly_latn.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_piu.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_qug.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_snn.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_tiv.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_uig_latn.txt"), ]; const BIDI_TEXTS: &[&str] = &[ - include_str!("../../../data/udhr/txt/udhr_aii.txt"), - include_str!("../../../data/udhr/txt/udhr_arb.txt"), - include_str!("../../../data/udhr/txt/udhr_mly_arab.txt"), - include_str!("../../../data/udhr/txt/udhr_pes_1.txt"), - include_str!("../../../data/udhr/txt/udhr_skr.txt"), - include_str!("../../../data/udhr/txt/udhr_urd.txt"), - include_str!("../../../data/udhr/txt/udhr_pes_2.txt"), - include_str!("../../../data/udhr/txt/udhr_uig_arab.txt"), - include_str!("../../../data/udhr/txt/udhr_urd_2.txt"), - include_str!("../../../data/udhr/txt/udhr_heb.txt"), - include_str!("../../../data/udhr/txt/udhr_pnb.txt"), - include_str!("../../../data/udhr/txt/udhr_ydd.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_aii.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_arb.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_mly_arab.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_pes_1.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_skr.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_urd.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_pes_2.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_uig_arab.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_urd_2.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_heb.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_pnb.txt"), + include_str!("../../../external/unicode/udhr/txt/udhr_ydd.txt"), ]; fn bench_bidi_info_new(b: &mut Bencher, texts: &[&str]) { From 07f715e1cdd0d4c8543c8f3ac40285e3a0480f34 Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 07:38:17 -0800 Subject: [PATCH 2/6] travis: Bump MIN_RUST_VERSION to 1.31.0 --- .travis.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 681e6179..a7708175 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ rust: - nightly - beta - stable - - 1.28.0 # = MIN_RUST_VERSION + - 1.31.0 # = MIN_RUST_VERSION branches: except: diff --git a/README.md b/README.md index d24d9ebf..dda826bf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Travis](https://img.shields.io/travis/open-i18n/rust-unic/master.svg?label=Linux%20build)](https://travis-ci.org/open-i18n/rust-unic/) [![AppVeyor](https://img.shields.io/appveyor/ci/open-i18n/rust-unic/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/open-i18n/rust-unic) -[![Rust-1.28.0+](https://img.shields.io/badge/rustc-1.28+-red.svg#MIN_RUST_VERSION)](https://www.rust-lang.org/) +[![Rust-1.31.0+](https://img.shields.io/badge/rustc-1.28+-red.svg#MIN_RUST_VERSION)](https://www.rust-lang.org/) [![Unicode-10.0.0](https://img.shields.io/badge/unicode-10.0.0-red.svg)](https://www.unicode.org/versions/Unicode10.0.0/) [![Release](https://img.shields.io/github/release/open-i18n/rust-unic.svg)](https://github.com/open-i18n/rust-unic/) [![Crates.io](https://img.shields.io/crates/v/unic.svg)](https://crates.io/crates/unic/) From ce80e0f72b666117de886380d5b1510a52d731ab Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 07:33:46 -0800 Subject: [PATCH 3/6] all: cargo fix --edition --- gen/src/source/emoji/emoji_data.rs | 4 ++-- gen/src/source/emoji/readme.rs | 2 +- gen/src/source/idna/idna_mapping_table.rs | 2 +- gen/src/source/idna/readme.rs | 4 ++-- gen/src/source/ucd/blocks.rs | 2 +- gen/src/source/ucd/derived_age.rs | 2 +- gen/src/source/ucd/derived_core_properties.rs | 2 +- .../source/ucd/derived_normalization_props.rs | 2 +- gen/src/source/ucd/grapheme_break_property.rs | 2 +- gen/src/source/ucd/jamo.rs | 2 +- gen/src/source/ucd/prop_list.rs | 2 +- gen/src/source/ucd/readme.rs | 4 ++-- gen/src/source/ucd/sentence_break_property.rs | 2 +- .../source/ucd/test/grapheme_break_test.rs | 2 +- gen/src/source/ucd/test/normalization_test.rs | 2 +- gen/src/source/ucd/test/word_break_test.rs | 2 +- gen/src/source/ucd/unicode_data.rs | 2 +- gen/src/source/ucd/word_break_property.rs | 2 +- gen/src/writer/common/mod.rs | 4 ++-- gen/src/writer/emoji/char.rs | 8 +++---- gen/src/writer/emoji/mod.rs | 2 +- gen/src/writer/idna/mapping.rs | 10 ++++---- gen/src/writer/idna/mod.rs | 2 +- gen/src/writer/normal/mod.rs | 2 +- gen/src/writer/normal/normal_tests.rs | 4 ++-- gen/src/writer/segment/mod.rs | 2 +- gen/src/writer/segment/segment_tests.rs | 6 ++--- gen/src/writer/ucd/age.rs | 10 ++++---- gen/src/writer/ucd/bidi.rs | 12 +++++----- gen/src/writer/ucd/blocks.rs | 10 ++++---- gen/src/writer/ucd/case.rs | 10 ++++---- gen/src/writer/ucd/category.rs | 10 ++++---- gen/src/writer/ucd/common.rs | 14 +++++------ gen/src/writer/ucd/core.rs | 4 ++-- gen/src/writer/ucd/hangul.rs | 4 ++-- gen/src/writer/ucd/ident.rs | 12 +++++----- gen/src/writer/ucd/mod.rs | 2 +- gen/src/writer/ucd/name.rs | 12 +++++----- gen/src/writer/ucd/normal.rs | 12 +++++----- gen/src/writer/ucd/segment.rs | 14 +++++------ gen/src/writer/ucd/segment_tests.rs | 8 +++---- unic/bidi/src/bidi_info.rs | 16 ++++++------- unic/bidi/src/lib.rs | 8 +++---- unic/char/basics/src/lib.rs | 8 +++---- unic/char/property/src/lib.rs | 4 ++-- .../property/tests/enum_property_macro.rs | 2 +- unic/char/range/src/iter.rs | 2 +- unic/char/range/src/lib.rs | 6 ++--- unic/char/range/src/par_iter.rs | 7 +++--- unic/char/range/src/range.rs | 2 +- unic/char/src/lib.rs | 2 +- unic/common/src/lib.rs | 2 +- unic/emoji/char/src/lib.rs | 14 +++++------ unic/emoji/src/lib.rs | 4 ++-- unic/idna/mapping/src/lib.rs | 4 ++-- unic/idna/mapping/src/mapping.rs | 2 +- unic/idna/punycode/src/lib.rs | 2 +- unic/idna/src/lib.rs | 10 ++++---- unic/idna/src/process.rs | 4 ++-- unic/normal/src/lib.rs | 6 ++--- unic/normal/src/recompose.rs | 2 +- unic/segment/src/lib.rs | 6 ++--- unic/src/lib.rs | 4 ++-- unic/ucd/age/src/lib.rs | 4 ++-- unic/ucd/bidi/src/lib.rs | 8 +++---- unic/ucd/block/src/lib.rs | 4 ++-- unic/ucd/case/src/lib.rs | 20 ++++++++-------- unic/ucd/category/src/lib.rs | 4 ++-- unic/ucd/common/src/lib.rs | 12 +++++----- unic/ucd/hangul/src/lib.rs | 4 ++-- unic/ucd/ident/src/lib.rs | 13 ++++++---- unic/ucd/name/src/lib.rs | 4 ++-- unic/ucd/normal/src/composition.rs | 4 ++-- unic/ucd/normal/src/decomposition.rs | 2 +- unic/ucd/normal/src/decomposition_type.rs | 2 +- unic/ucd/normal/src/lib.rs | 12 +++++----- unic/ucd/segment/src/lib.rs | 8 +++---- unic/ucd/segment/tests/conformance_tests.rs | 10 ++++---- unic/ucd/src/lib.rs | 24 +++++++++---------- unic/ucd/version/src/lib.rs | 4 ++-- 80 files changed, 239 insertions(+), 233 deletions(-) diff --git a/gen/src/source/emoji/emoji_data.rs b/gen/src/source/emoji/emoji_data.rs index 643597f2..0558599d 100644 --- a/gen/src/source/emoji/emoji_data.rs +++ b/gen/src/source/emoji/emoji_data.rs @@ -12,8 +12,8 @@ use std::char; use std::collections::BTreeSet; use std::str::FromStr; -use source::ucd::BINARY_PROPERTIES_REGEX; -use source::utils::read; +use crate::source::ucd::BINARY_PROPERTIES_REGEX; +use crate::source::utils::read; lazy_static! { pub static ref EMOJI_DATA: EmojiData = { diff --git a/gen/src/source/emoji/readme.rs b/gen/src/source/emoji/readme.rs index bbf4c7e1..d8292f59 100644 --- a/gen/src/source/emoji/readme.rs +++ b/gen/src/source/emoji/readme.rs @@ -12,7 +12,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; pub struct EmojiDataVersion { pub major: u8, diff --git a/gen/src/source/idna/idna_mapping_table.rs b/gen/src/source/idna/idna_mapping_table.rs index e228089b..cfff541b 100644 --- a/gen/src/source/idna/idna_mapping_table.rs +++ b/gen/src/source/idna/idna_mapping_table.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref IDNA_MAPPING: IdnaMapping = { diff --git a/gen/src/source/idna/readme.rs b/gen/src/source/idna/readme.rs index b9f2c0d0..65b1f60c 100644 --- a/gen/src/source/idna/readme.rs +++ b/gen/src/source/idna/readme.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use source::common::unicode_version::UnicodeVersion; -use source::utils::read; +use crate::source::common::unicode_version::UnicodeVersion; +use crate::source::utils::read; lazy_static! { pub static ref UNICODE_VERSION: UnicodeVersion = { diff --git a/gen/src/source/ucd/blocks.rs b/gen/src/source/ucd/blocks.rs index ee2261a3..22b224f9 100644 --- a/gen/src/source/ucd/blocks.rs +++ b/gen/src/source/ucd/blocks.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref BLOCKS_DATA: BlocksData = { diff --git a/gen/src/source/ucd/derived_age.rs b/gen/src/source/ucd/derived_age.rs index 0927bc7a..193f061d 100644 --- a/gen/src/source/ucd/derived_age.rs +++ b/gen/src/source/ucd/derived_age.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref AGE_DATA: AgeData = { diff --git a/gen/src/source/ucd/derived_core_properties.rs b/gen/src/source/ucd/derived_core_properties.rs index 5d518480..ec29bc44 100644 --- a/gen/src/source/ucd/derived_core_properties.rs +++ b/gen/src/source/ucd/derived_core_properties.rs @@ -12,7 +12,7 @@ use std::char; use std::collections::BTreeSet; use std::str::FromStr; -use source::utils::read; +use crate::source::utils::read; use super::BINARY_PROPERTIES_REGEX; diff --git a/gen/src/source/ucd/derived_normalization_props.rs b/gen/src/source/ucd/derived_normalization_props.rs index 035b3800..27558655 100644 --- a/gen/src/source/ucd/derived_normalization_props.rs +++ b/gen/src/source/ucd/derived_normalization_props.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref COMPOSITION_EXCLUSIONS: CompositionExclusions = { diff --git a/gen/src/source/ucd/grapheme_break_property.rs b/gen/src/source/ucd/grapheme_break_property.rs index 9060e99f..a5d9fd31 100644 --- a/gen/src/source/ucd/grapheme_break_property.rs +++ b/gen/src/source/ucd/grapheme_break_property.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref GRAPHEME_CLUSTER_BREAK_DATA: GraphemeClusterBreakData = { diff --git a/gen/src/source/ucd/jamo.rs b/gen/src/source/ucd/jamo.rs index b8e75c1c..f0bef6e6 100644 --- a/gen/src/source/ucd/jamo.rs +++ b/gen/src/source/ucd/jamo.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref JAMO_DATA: JamoData = diff --git a/gen/src/source/ucd/prop_list.rs b/gen/src/source/ucd/prop_list.rs index 29353c22..21c8b4f6 100644 --- a/gen/src/source/ucd/prop_list.rs +++ b/gen/src/source/ucd/prop_list.rs @@ -12,7 +12,7 @@ use std::char; use std::collections::BTreeSet; use std::str::FromStr; -use source::utils::read; +use crate::source::utils::read; use super::BINARY_PROPERTIES_REGEX; diff --git a/gen/src/source/ucd/readme.rs b/gen/src/source/ucd/readme.rs index f577e64d..e39bc57a 100644 --- a/gen/src/source/ucd/readme.rs +++ b/gen/src/source/ucd/readme.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use source::common::unicode_version::UnicodeVersion; -use source::utils::read; +use crate::source::common::unicode_version::UnicodeVersion; +use crate::source::utils::read; lazy_static! { pub static ref UNICODE_VERSION: UnicodeVersion = { diff --git a/gen/src/source/ucd/sentence_break_property.rs b/gen/src/source/ucd/sentence_break_property.rs index 33779fc9..d7689b21 100644 --- a/gen/src/source/ucd/sentence_break_property.rs +++ b/gen/src/source/ucd/sentence_break_property.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref SENTENCE_BREAK_DATA: SentenceBreakData = { diff --git a/gen/src/source/ucd/test/grapheme_break_test.rs b/gen/src/source/ucd/test/grapheme_break_test.rs index 54ae2f81..1b6f4961 100644 --- a/gen/src/source/ucd/test/grapheme_break_test.rs +++ b/gen/src/source/ucd/test/grapheme_break_test.rs @@ -13,7 +13,7 @@ use std::str::FromStr; use itertools::Itertools; -use source::utils::read; +use crate::source::utils::read; use regex::Regex; diff --git a/gen/src/source/ucd/test/normalization_test.rs b/gen/src/source/ucd/test/normalization_test.rs index d3445326..52fd7863 100644 --- a/gen/src/source/ucd/test/normalization_test.rs +++ b/gen/src/source/ucd/test/normalization_test.rs @@ -11,7 +11,7 @@ use std::char; use std::str::FromStr; -use source::utils::read; +use crate::source::utils::read; use regex::Regex; diff --git a/gen/src/source/ucd/test/word_break_test.rs b/gen/src/source/ucd/test/word_break_test.rs index 76db3ca9..40f05ac0 100644 --- a/gen/src/source/ucd/test/word_break_test.rs +++ b/gen/src/source/ucd/test/word_break_test.rs @@ -13,7 +13,7 @@ use std::str::FromStr; use itertools::Itertools; -use source::utils::read; +use crate::source::utils::read; use regex::Regex; diff --git a/gen/src/source/ucd/unicode_data.rs b/gen/src/source/ucd/unicode_data.rs index 605eb9f9..772bd49b 100644 --- a/gen/src/source/ucd/unicode_data.rs +++ b/gen/src/source/ucd/unicode_data.rs @@ -13,7 +13,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref UNICODE_DATA: UnicodeData = { diff --git a/gen/src/source/ucd/word_break_property.rs b/gen/src/source/ucd/word_break_property.rs index 5f2e6395..039bfc1b 100644 --- a/gen/src/source/ucd/word_break_property.rs +++ b/gen/src/source/ucd/word_break_property.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use regex::Regex; -use source::utils::read; +use crate::source::utils::read; lazy_static! { pub static ref WORD_BREAK_DATA: WordBreakData = { diff --git a/gen/src/writer/common/mod.rs b/gen/src/writer/common/mod.rs index b42db361..05febcc5 100644 --- a/gen/src/writer/common/mod.rs +++ b/gen/src/writer/common/mod.rs @@ -10,9 +10,9 @@ use std::path::Path; -use source::common::unicode_version::UnicodeVersion; +use crate::source::common::unicode_version::UnicodeVersion; -use writer::utils::write; +use crate::writer::utils::write; pub fn emit_unicode_version(dir: &Path, unicode_version: &UnicodeVersion) { write( diff --git a/gen/src/writer/emoji/char.rs b/gen/src/writer/emoji/char.rs index d4cdb7e7..027404dc 100644 --- a/gen/src/writer/emoji/char.rs +++ b/gen/src/writer/emoji/char.rs @@ -10,11 +10,11 @@ use std::path::Path; -use source::emoji::emoji_data::EMOJI_DATA; -use source::emoji::readme::{EmojiDataVersion, EMOJI_VERSION}; +use crate::source::emoji::emoji_data::EMOJI_DATA; +use crate::source::emoji::readme::{EmojiDataVersion, EMOJI_VERSION}; -use writer::utils::tables::ToRangeCharSet; -use writer::utils::write; +use crate::writer::utils::tables::ToRangeCharSet; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_emoji_data_version(dir, &EMOJI_VERSION); diff --git a/gen/src/writer/emoji/mod.rs b/gen/src/writer/emoji/mod.rs index 55d461f8..06c9cfbb 100644 --- a/gen/src/writer/emoji/mod.rs +++ b/gen/src/writer/emoji/mod.rs @@ -10,7 +10,7 @@ mod char; -use writer::utils::clean_dir; +use crate::writer::utils::clean_dir; pub fn generate() { char::generate(&clean_dir("unic/emoji/char/tables")); diff --git a/gen/src/writer/idna/mapping.rs b/gen/src/writer/idna/mapping.rs index 4ab090b6..830af729 100644 --- a/gen/src/writer/idna/mapping.rs +++ b/gen/src/writer/idna/mapping.rs @@ -10,12 +10,12 @@ use std::path::Path; -use source::idna::idna_mapping_table::IDNA_MAPPING; -use source::idna::readme::UNICODE_VERSION; +use crate::source::idna::idna_mapping_table::IDNA_MAPPING; +use crate::source::idna::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/idna/mod.rs b/gen/src/writer/idna/mod.rs index 74eba0bb..488ecbd1 100644 --- a/gen/src/writer/idna/mod.rs +++ b/gen/src/writer/idna/mod.rs @@ -10,7 +10,7 @@ mod mapping; -use writer::utils::clean_dir; +use crate::writer::utils::clean_dir; pub fn generate() { mapping::generate(&clean_dir("unic/idna/mapping/tables")); diff --git a/gen/src/writer/normal/mod.rs b/gen/src/writer/normal/mod.rs index 5484bdf4..cfd9b16b 100644 --- a/gen/src/writer/normal/mod.rs +++ b/gen/src/writer/normal/mod.rs @@ -10,7 +10,7 @@ mod normal_tests; -use writer::utils::clean_dir; +use crate::writer::utils::clean_dir; pub fn generate() { normal_tests::generate(&clean_dir("unic/normal/tests/tables")); diff --git a/gen/src/writer/normal/normal_tests.rs b/gen/src/writer/normal/normal_tests.rs index c65899d7..82a9194e 100644 --- a/gen/src/writer/normal/normal_tests.rs +++ b/gen/src/writer/normal/normal_tests.rs @@ -11,9 +11,9 @@ use std::fmt::Write; use std::path::Path; -use source::ucd::test::normalization_test::NORMALIZATION_TESTS; +use crate::source::ucd::test::normalization_test::NORMALIZATION_TESTS; -use writer::utils::write; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_conformance_tests_data(dir); diff --git a/gen/src/writer/segment/mod.rs b/gen/src/writer/segment/mod.rs index 44483e36..8565f4aa 100644 --- a/gen/src/writer/segment/mod.rs +++ b/gen/src/writer/segment/mod.rs @@ -10,7 +10,7 @@ mod segment_tests; -use writer::utils::clean_dir; +use crate::writer::utils::clean_dir; pub fn generate() { segment_tests::generate(&clean_dir("unic/segment/tests/tables")); diff --git a/gen/src/writer/segment/segment_tests.rs b/gen/src/writer/segment/segment_tests.rs index 14c88b3d..60392516 100644 --- a/gen/src/writer/segment/segment_tests.rs +++ b/gen/src/writer/segment/segment_tests.rs @@ -10,10 +10,10 @@ use std::path::Path; -use source::ucd::test::grapheme_break_test::{GraphemeBreakTest, GRAPHEME_BREAK_TESTS}; -use source::ucd::test::word_break_test::{WordBreakTest, WORD_BREAK_TESTS}; +use crate::source::ucd::test::grapheme_break_test::{GraphemeBreakTest, GRAPHEME_BREAK_TESTS}; +use crate::source::ucd::test::word_break_test::{WordBreakTest, WORD_BREAK_TESTS}; -use writer::utils::write; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_grapheme_cluster_break_test_data(dir); diff --git a/gen/src/writer/ucd/age.rs b/gen/src/writer/ucd/age.rs index 5c6414af..de9fd831 100644 --- a/gen/src/writer/ucd/age.rs +++ b/gen/src/writer/ucd/age.rs @@ -11,12 +11,12 @@ use std::fmt::Display; use std::path::Path; -use source::ucd::derived_age::AGE_DATA; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::derived_age::AGE_DATA; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/bidi.rs b/gen/src/writer/ucd/bidi.rs index 31c43461..78b77e19 100644 --- a/gen/src/writer/ucd/bidi.rs +++ b/gen/src/writer/ucd/bidi.rs @@ -13,13 +13,13 @@ use std::collections::{BTreeMap, BTreeSet}; use std::fmt::Display; use std::path::Path; -use source::ucd::prop_list::PROP_LIST; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::unicode_data::UNICODE_DATA; +use crate::source::ucd::prop_list::PROP_LIST; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::unicode_data::UNICODE_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::{ToRangeCharSet, ToRangeCharTable}; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::{ToRangeCharSet, ToRangeCharTable}; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/blocks.rs b/gen/src/writer/ucd/blocks.rs index 44fd3427..ac6610ff 100644 --- a/gen/src/writer/ucd/blocks.rs +++ b/gen/src/writer/ucd/blocks.rs @@ -10,12 +10,12 @@ use std::path::Path; -use source::ucd::blocks::BLOCKS_DATA; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::blocks::BLOCKS_DATA; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/case.rs b/gen/src/writer/ucd/case.rs index fd4eb86d..b7b98c27 100644 --- a/gen/src/writer/ucd/case.rs +++ b/gen/src/writer/ucd/case.rs @@ -10,12 +10,12 @@ use std::path::Path; -use source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharSet; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharSet; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/category.rs b/gen/src/writer/ucd/category.rs index ac6db60d..a228a0d8 100644 --- a/gen/src/writer/ucd/category.rs +++ b/gen/src/writer/ucd/category.rs @@ -13,12 +13,12 @@ use std::collections::BTreeMap; use std::fmt::Display; use std::path::Path; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::unicode_data::UNICODE_DATA; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::unicode_data::UNICODE_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/common.rs b/gen/src/writer/ucd/common.rs index 38ad2c7b..62df2be7 100644 --- a/gen/src/writer/ucd/common.rs +++ b/gen/src/writer/ucd/common.rs @@ -11,14 +11,14 @@ use std::collections::BTreeSet; use std::path::Path; -use source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; -use source::ucd::prop_list::PROP_LIST; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::unicode_data::UNICODE_DATA; +use crate::source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; +use crate::source::ucd::prop_list::PROP_LIST; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::unicode_data::UNICODE_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharSet; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharSet; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/core.rs b/gen/src/writer/ucd/core.rs index 474f4c4d..73599432 100644 --- a/gen/src/writer/ucd/core.rs +++ b/gen/src/writer/ucd/core.rs @@ -10,9 +10,9 @@ use std::path::Path; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; +use crate::writer::common::emit_unicode_version; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/hangul.rs b/gen/src/writer/ucd/hangul.rs index 474f4c4d..73599432 100644 --- a/gen/src/writer/ucd/hangul.rs +++ b/gen/src/writer/ucd/hangul.rs @@ -10,9 +10,9 @@ use std::path::Path; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; +use crate::writer::common::emit_unicode_version; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/ident.rs b/gen/src/writer/ucd/ident.rs index 674af04f..c71bcc5d 100644 --- a/gen/src/writer/ucd/ident.rs +++ b/gen/src/writer/ucd/ident.rs @@ -10,13 +10,13 @@ use std::path::Path; -use source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; -use source::ucd::prop_list::PROP_LIST; -use source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::derived_core_properties::DERIVED_CORE_PROPERTIES; +use crate::source::ucd::prop_list::PROP_LIST; +use crate::source::ucd::readme::UNICODE_VERSION; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharSet; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharSet; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/mod.rs b/gen/src/writer/ucd/mod.rs index c69e720a..e2c691f3 100644 --- a/gen/src/writer/ucd/mod.rs +++ b/gen/src/writer/ucd/mod.rs @@ -22,7 +22,7 @@ mod normal; mod segment; mod segment_tests; -use writer::utils::clean_dir; +use crate::writer::utils::clean_dir; pub fn generate() { age::generate(&clean_dir("unic/ucd/age/tables")); diff --git a/gen/src/writer/ucd/name.rs b/gen/src/writer/ucd/name.rs index 0287c241..a27b9cba 100644 --- a/gen/src/writer/ucd/name.rs +++ b/gen/src/writer/ucd/name.rs @@ -13,13 +13,13 @@ use std::collections::{BTreeMap, BTreeSet}; use std::fmt::Write; use std::path::Path; -use source::ucd::jamo::JAMO_DATA; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::unicode_data::UNICODE_DATA; +use crate::source::ucd::jamo::JAMO_DATA; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::unicode_data::UNICODE_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToDirectCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToDirectCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/normal.rs b/gen/src/writer/ucd/normal.rs index a8566b38..144a635e 100644 --- a/gen/src/writer/ucd/normal.rs +++ b/gen/src/writer/ucd/normal.rs @@ -12,13 +12,13 @@ use std::char; use std::collections::{BTreeMap, BTreeSet}; use std::path::Path; -use source::ucd::derived_normalization_props::COMPOSITION_EXCLUSIONS; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::unicode_data::UNICODE_DATA; +use crate::source::ucd::derived_normalization_props::COMPOSITION_EXCLUSIONS; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::unicode_data::UNICODE_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::{ToDirectCharTable, ToRangeCharSet, ToRangeCharTable}; -use writer::utils::{capitalize, write}; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::{ToDirectCharTable, ToRangeCharSet, ToRangeCharTable}; +use crate::writer::utils::{capitalize, write}; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/segment.rs b/gen/src/writer/ucd/segment.rs index 62932beb..1bdd3b88 100644 --- a/gen/src/writer/ucd/segment.rs +++ b/gen/src/writer/ucd/segment.rs @@ -10,14 +10,14 @@ use std::path::Path; -use source::ucd::grapheme_break_property::GRAPHEME_CLUSTER_BREAK_DATA; -use source::ucd::readme::UNICODE_VERSION; -use source::ucd::sentence_break_property::SENTENCE_BREAK_DATA; -use source::ucd::word_break_property::WORD_BREAK_DATA; +use crate::source::ucd::grapheme_break_property::GRAPHEME_CLUSTER_BREAK_DATA; +use crate::source::ucd::readme::UNICODE_VERSION; +use crate::source::ucd::sentence_break_property::SENTENCE_BREAK_DATA; +use crate::source::ucd::word_break_property::WORD_BREAK_DATA; -use writer::common::emit_unicode_version; -use writer::utils::tables::ToRangeCharTable; -use writer::utils::write; +use crate::writer::common::emit_unicode_version; +use crate::writer::utils::tables::ToRangeCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_unicode_version(dir, &UNICODE_VERSION); diff --git a/gen/src/writer/ucd/segment_tests.rs b/gen/src/writer/ucd/segment_tests.rs index 18f8b570..c518b113 100644 --- a/gen/src/writer/ucd/segment_tests.rs +++ b/gen/src/writer/ucd/segment_tests.rs @@ -11,11 +11,11 @@ use std::collections::BTreeMap; use std::path::Path; -use source::ucd::test::grapheme_break_test::{GraphemeBreakTest, GRAPHEME_BREAK_TESTS}; -use source::ucd::test::word_break_test::{WordBreakTest, WORD_BREAK_TESTS}; +use crate::source::ucd::test::grapheme_break_test::{GraphemeBreakTest, GRAPHEME_BREAK_TESTS}; +use crate::source::ucd::test::word_break_test::{WordBreakTest, WORD_BREAK_TESTS}; -use writer::utils::tables::ToDirectCharTable; -use writer::utils::write; +use crate::writer::utils::tables::ToDirectCharTable; +use crate::writer::utils::write; pub fn generate(dir: &Path) { emit_grapheme_cluster_break_test_data(dir); diff --git a/unic/bidi/src/bidi_info.rs b/unic/bidi/src/bidi_info.rs index a63dec9b..0edafaf6 100644 --- a/unic/bidi/src/bidi_info.rs +++ b/unic/bidi/src/bidi_info.rs @@ -18,14 +18,14 @@ use std::ops::Range; use unic_ucd_bidi::bidi_class::abbr_names::*; use unic_ucd_bidi::BidiClass; -use explicit; -use format_chars; -use implicit; -use level; -use prepare; - -use level::{Level, LTR_LEVEL, RTL_LEVEL}; -use prepare::LevelRun; +use crate::explicit; +use crate::format_chars; +use crate::implicit; +use crate::level; +use crate::prepare; + +use crate::level::{Level, LTR_LEVEL, RTL_LEVEL}; +use crate::prepare::LevelRun; /// Bidi information about a single paragraph #[derive(Clone, Debug, Eq, PartialEq, Hash)] diff --git a/unic/bidi/src/lib.rs b/unic/bidi/src/lib.rs index 67f7d3e1..475b82f9 100644 --- a/unic/bidi/src/lib.rs +++ b/unic/bidi/src/lib.rs @@ -87,19 +87,19 @@ pub use unic_ucd_bidi::UNICODE_VERSION; pub use unic_ucd_bidi::{bidi_class, BidiClass, BidiClassCategory}; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod format_chars; pub mod level; -pub use level::Level; +pub use crate::level::Level; mod bidi_info; -pub use bidi_info::{BidiInfo, ParagraphInfo}; +pub use crate::bidi_info::{BidiInfo, ParagraphInfo}; mod explicit; mod implicit; mod prepare; -pub use prepare::LevelRun; +pub use crate::prepare::LevelRun; diff --git a/unic/char/basics/src/lib.rs b/unic/char/basics/src/lib.rs index 765fc604..8d72f364 100644 --- a/unic/char/basics/src/lib.rs +++ b/unic/char/basics/src/lib.rs @@ -68,13 +68,13 @@ extern crate core; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod noncharacter; -pub use noncharacter::is_noncharacter; +pub use crate::noncharacter::is_noncharacter; pub mod private_use; -pub use private_use::is_private_use; +pub use crate::private_use::is_private_use; pub mod notation; -pub use notation::unicode_notation; +pub use crate::notation::unicode_notation; diff --git a/unic/char/property/src/lib.rs b/unic/char/property/src/lib.rs index 524e50c5..360a6716 100644 --- a/unic/char/property/src/lib.rs +++ b/unic/char/property/src/lib.rs @@ -35,13 +35,13 @@ extern crate unic_char_range; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod property; pub use self::property::{CharProperty, PartialCharProperty, TotalCharProperty}; mod range_types; -pub use range_types::{ +pub use crate::range_types::{ BinaryCharProperty, CustomCharProperty, EnumeratedCharProperty, diff --git a/unic/char/property/tests/enum_property_macro.rs b/unic/char/property/tests/enum_property_macro.rs index 901e6085..e1caa41f 100644 --- a/unic/char/property/tests/enum_property_macro.rs +++ b/unic/char/property/tests/enum_property_macro.rs @@ -78,7 +78,7 @@ fn test_basic_macro_use() { #[test] fn test_fromstr_ignores_case() { - use abbr_names::V1; + use crate::abbr_names::V1; assert_eq!("variant_1".parse(), Ok(V1)); assert_eq!("VaRiAnT_1".parse(), Ok(V1)); diff --git a/unic/char/range/src/iter.rs b/unic/char/range/src/iter.rs index d4dde7e7..44901dfe 100644 --- a/unic/char/range/src/iter.rs +++ b/unic/char/range/src/iter.rs @@ -10,7 +10,7 @@ use core::{char, ops}; -use {step, CharRange}; +use crate::{step, CharRange}; const SURROGATE_RANGE: ops::Range = 0xD800..0xE000; diff --git a/unic/char/range/src/lib.rs b/unic/char/range/src/lib.rs index 3693a25f..c8f4737f 100644 --- a/unic/char/range/src/lib.rs +++ b/unic/char/range/src/lib.rs @@ -56,13 +56,13 @@ extern crate core; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod iter; -pub use iter::CharIter; +pub use crate::iter::CharIter; mod range; -pub use range::CharRange; +pub use crate::range::CharRange; #[macro_use] mod macros; diff --git a/unic/char/range/src/par_iter.rs b/unic/char/range/src/par_iter.rs index a5d78c1e..bf5f4a30 100644 --- a/unic/char/range/src/par_iter.rs +++ b/unic/char/range/src/par_iter.rs @@ -12,12 +12,13 @@ extern crate rayon; use self::rayon::iter::plumbing::{Consumer, ProducerCallback, UnindexedConsumer}; use self::rayon::prelude::*; +use crate::step::{AFTER_SURROGATE, BEFORE_SURROGATE}; +use crate::CharRange; use core::char; use core::ops::Range; -use step::{AFTER_SURROGATE, BEFORE_SURROGATE}; -use CharRange; -const SKIP_LENGTH: u32 = ::step::AFTER_SURROGATE as u32 - ::step::BEFORE_SURROGATE as u32 - 1; +const SKIP_LENGTH: u32 = + crate::step::AFTER_SURROGATE as u32 - crate::step::BEFORE_SURROGATE as u32 - 1; #[derive(Clone, Debug)] pub struct Iter(rayon::iter::Map, fn(u32) -> char>); diff --git a/unic/char/range/src/range.rs b/unic/char/range/src/range.rs index f2716516..d958016f 100644 --- a/unic/char/range/src/range.rs +++ b/unic/char/range/src/range.rs @@ -14,7 +14,7 @@ use core::{char, cmp}; use std::collections::Bound; use self::cmp::Ordering; -use CharIter; +use crate::CharIter; /// A range of unicode code points. /// diff --git a/unic/char/src/lib.rs b/unic/char/src/lib.rs index f9945899..dcc6ea57 100644 --- a/unic/char/src/lib.rs +++ b/unic/char/src/lib.rs @@ -26,4 +26,4 @@ pub extern crate unic_char_property as property; pub extern crate unic_char_range as range; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/common/src/lib.rs b/unic/common/src/lib.rs index e085628d..0ce4f213 100644 --- a/unic/common/src/lib.rs +++ b/unic/common/src/lib.rs @@ -26,6 +26,6 @@ //! components. mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod version; diff --git a/unic/emoji/char/src/lib.rs b/unic/emoji/char/src/lib.rs index 4f2557de..6a26a67c 100644 --- a/unic/emoji/char/src/lib.rs +++ b/unic/emoji/char/src/lib.rs @@ -27,22 +27,22 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod emoji_version; -pub use emoji_version::{UnicodeVersion, EMOJI_VERSION}; +pub use crate::emoji_version::{UnicodeVersion, EMOJI_VERSION}; mod emoji; -pub use emoji::{is_emoji, Emoji}; +pub use crate::emoji::{is_emoji, Emoji}; mod emoji_component; -pub use emoji_component::{is_emoji_component, EmojiComponent}; +pub use crate::emoji_component::{is_emoji_component, EmojiComponent}; mod emoji_modifier; -pub use emoji_modifier::{is_emoji_modifier, EmojiModifier}; +pub use crate::emoji_modifier::{is_emoji_modifier, EmojiModifier}; mod emoji_modifier_base; -pub use emoji_modifier_base::{is_emoji_modifier_base, EmojiModifierBase}; +pub use crate::emoji_modifier_base::{is_emoji_modifier_base, EmojiModifierBase}; mod emoji_presentation; -pub use emoji_presentation::{is_emoji_presentation, EmojiPresentation}; +pub use crate::emoji_presentation::{is_emoji_presentation, EmojiPresentation}; diff --git a/unic/emoji/src/lib.rs b/unic/emoji/src/lib.rs index b80b8dfe..c2b82447 100644 --- a/unic/emoji/src/lib.rs +++ b/unic/emoji/src/lib.rs @@ -26,6 +26,6 @@ pub extern crate unic_emoji_char as char; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; -pub use char::EMOJI_VERSION; +pub use crate::char::EMOJI_VERSION; diff --git a/unic/idna/mapping/src/lib.rs b/unic/idna/mapping/src/lib.rs index 5ecc7d9c..e04bd953 100644 --- a/unic/idna/mapping/src/lib.rs +++ b/unic/idna/mapping/src/lib.rs @@ -33,9 +33,9 @@ mod mapping; use unic_ucd_version::UnicodeVersion; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; -pub use mapping::Mapping; +pub use crate::mapping::Mapping; /// The version of [Unicode IDNA Compatibility Processing](https://www.unicode.org/reports/tr46/) pub const UNICODE_VERSION: UnicodeVersion = include!("../tables/unicode_version.rsv"); diff --git a/unic/idna/mapping/src/mapping.rs b/unic/idna/mapping/src/mapping.rs index f6aa9046..843b90ad 100644 --- a/unic/idna/mapping/src/mapping.rs +++ b/unic/idna/mapping/src/mapping.rs @@ -56,7 +56,7 @@ mod tests { #[test] fn test_mapping() { - use Mapping::*; + use crate::Mapping::*; assert_eq!(Mapping::of('\u{0}'), DisallowedStd3Valid); assert_eq!(Mapping::of('-'), Valid); diff --git a/unic/idna/punycode/src/lib.rs b/unic/idna/punycode/src/lib.rs index 90af00f3..cbcd5862 100644 --- a/unic/idna/punycode/src/lib.rs +++ b/unic/idna/punycode/src/lib.rs @@ -32,7 +32,7 @@ use std::char; use std::u32; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; // Bootstring parameters for Punycode static BASE: u32 = 36; diff --git a/unic/idna/src/lib.rs b/unic/idna/src/lib.rs index 54c28bca..c0f53cef 100644 --- a/unic/idna/src/lib.rs +++ b/unic/idna/src/lib.rs @@ -55,11 +55,11 @@ extern crate unic_idna_mapping as mapping; extern crate unic_idna_punycode as punycode; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; -pub use mapping::UNICODE_VERSION; +pub use crate::mapping::UNICODE_VERSION; mod process; -pub use process::PUNYCODE_PREFIX; -pub use process::{to_ascii, to_unicode}; -pub use process::{Errors, Flags}; +pub use crate::process::PUNYCODE_PREFIX; +pub use crate::process::{to_ascii, to_unicode}; +pub use crate::process::{Errors, Flags}; diff --git a/unic/idna/src/process.rs b/unic/idna/src/process.rs index fda9a40b..a9c51838 100644 --- a/unic/idna/src/process.rs +++ b/unic/idna/src/process.rs @@ -13,8 +13,8 @@ use unic_normal::StrNormalForm; use unic_ucd_bidi::{bidi_class, BidiClass}; use unic_ucd_normal::is_combining_mark; -use mapping::Mapping; -use punycode; +use crate::mapping::Mapping; +use crate::punycode; /// Prefix used in Punycode encoding. pub static PUNYCODE_PREFIX: &'static str = "xn--"; diff --git a/unic/normal/src/lib.rs b/unic/normal/src/lib.rs index 1d17c9c8..26fec136 100644 --- a/unic/normal/src/lib.rs +++ b/unic/normal/src/lib.rs @@ -43,12 +43,12 @@ mod recompose; use std::str::Chars; -pub use decompose::Decompositions; -pub use recompose::Recompositions; +pub use crate::decompose::Decompositions; +pub use crate::recompose::Recompositions; pub use unic_ucd_normal::UNICODE_VERSION; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; /// Methods for iterating over strings while applying Unicode normalizations /// as described in diff --git a/unic/normal/src/recompose.rs b/unic/normal/src/recompose.rs index 93e99ac0..febe4fb4 100644 --- a/unic/normal/src/recompose.rs +++ b/unic/normal/src/recompose.rs @@ -14,7 +14,7 @@ use std::fmt::{self, Write}; use unic_ucd_normal::{compose, CanonicalCombiningClass}; -use decompose::Decompositions; +use crate::decompose::Decompositions; #[derive(Clone, Debug)] enum RecompositionState { diff --git a/unic/segment/src/lib.rs b/unic/segment/src/lib.rs index d002d0d3..3b166d3e 100644 --- a/unic/segment/src/lib.rs +++ b/unic/segment/src/lib.rs @@ -86,10 +86,10 @@ extern crate unic_ucd_common; pub use unic_ucd_segment::UNICODE_VERSION; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod grapheme; -pub use grapheme::{GraphemeCursor, GraphemeIncomplete, GraphemeIndices, Graphemes}; +pub use crate::grapheme::{GraphemeCursor, GraphemeIncomplete, GraphemeIndices, Graphemes}; mod word; -pub use word::{WordBoundIndices, WordBounds, Words}; +pub use crate::word::{WordBoundIndices, WordBounds, Words}; diff --git a/unic/src/lib.rs b/unic/src/lib.rs index b5cce402..808a7bcb 100644 --- a/unic/src/lib.rs +++ b/unic/src/lib.rs @@ -180,7 +180,7 @@ pub extern crate unic_segment as segment; pub extern crate unic_ucd as ucd; /// The [Unicode version](https://www.unicode.org/versions/) of data -pub use ucd::UNICODE_VERSION; +pub use crate::ucd::UNICODE_VERSION; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/age/src/lib.rs b/unic/ucd/age/src/lib.rs index 9e4c0d72..1f3012ab 100644 --- a/unic/ucd/age/src/lib.rs +++ b/unic/ucd/age/src/lib.rs @@ -34,10 +34,10 @@ extern crate unic_ucd_version; pub use unic_ucd_version::UnicodeVersion; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod age; -pub use age::{Age, CharAge}; +pub use crate::age::{Age, CharAge}; /// The [Unicode version](https://www.unicode.org/versions/) of data pub const UNICODE_VERSION: UnicodeVersion = include!("../tables/unicode_version.rsv"); diff --git a/unic/ucd/bidi/src/lib.rs b/unic/ucd/bidi/src/lib.rs index 9fa30dc0..bf9d1571 100644 --- a/unic/ucd/bidi/src/lib.rs +++ b/unic/ucd/bidi/src/lib.rs @@ -33,16 +33,16 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod bidi_class; -pub use bidi_class::{BidiClass, BidiClassCategory, CharBidiClass, StrBidiClass}; +pub use crate::bidi_class::{BidiClass, BidiClassCategory, CharBidiClass, StrBidiClass}; pub mod bidi_control; -pub use bidi_control::{is_bidi_control, BidiControl}; +pub use crate::bidi_control::{is_bidi_control, BidiControl}; pub mod bidi_mirrored; -pub use bidi_mirrored::{is_bidi_mirrored, BidiMirrored}; +pub use crate::bidi_mirrored::{is_bidi_mirrored, BidiMirrored}; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/block/src/lib.rs b/unic/ucd/block/src/lib.rs index 65f92142..7ec6b4b6 100644 --- a/unic/ucd/block/src/lib.rs +++ b/unic/ucd/block/src/lib.rs @@ -30,10 +30,10 @@ extern crate unic_char_property; extern crate unic_ucd_version; mod block; -pub use block::{Block, BlockIter}; +pub use crate::block::{Block, BlockIter}; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/case/src/lib.rs b/unic/ucd/case/src/lib.rs index 3586183b..f21071b0 100644 --- a/unic/ucd/case/src/lib.rs +++ b/unic/ucd/case/src/lib.rs @@ -33,34 +33,34 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod lowercase; -pub use lowercase::{is_lowercase, Lowercase}; +pub use crate::lowercase::{is_lowercase, Lowercase}; pub mod uppercase; -pub use uppercase::{is_uppercase, Uppercase}; +pub use crate::uppercase::{is_uppercase, Uppercase}; pub mod cased; -pub use cased::{is_cased, Cased}; +pub use crate::cased::{is_cased, Cased}; pub mod case_ignorable; -pub use case_ignorable::{is_case_ignorable, CaseIgnorable}; +pub use crate::case_ignorable::{is_case_ignorable, CaseIgnorable}; pub mod changes_when_lowercased; -pub use changes_when_lowercased::{changes_when_lowercased, ChangesWhenLowercased}; +pub use crate::changes_when_lowercased::{changes_when_lowercased, ChangesWhenLowercased}; pub mod changes_when_uppercased; -pub use changes_when_uppercased::{changes_when_uppercased, ChangesWhenUppercased}; +pub use crate::changes_when_uppercased::{changes_when_uppercased, ChangesWhenUppercased}; pub mod changes_when_titlecased; -pub use changes_when_titlecased::{changes_when_titlecased, ChangesWhenTitlecased}; +pub use crate::changes_when_titlecased::{changes_when_titlecased, ChangesWhenTitlecased}; pub mod changes_when_casefolded; -pub use changes_when_casefolded::{changes_when_casefolded, ChangesWhenCasefolded}; +pub use crate::changes_when_casefolded::{changes_when_casefolded, ChangesWhenCasefolded}; pub mod changes_when_casemapped; -pub use changes_when_casemapped::{changes_when_casemapped, ChangesWhenCasemapped}; +pub use crate::changes_when_casemapped::{changes_when_casemapped, ChangesWhenCasemapped}; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/category/src/lib.rs b/unic/ucd/category/src/lib.rs index 253e1b8b..82d3bdf7 100644 --- a/unic/ucd/category/src/lib.rs +++ b/unic/ucd/category/src/lib.rs @@ -53,10 +53,10 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod category; -pub use category::GeneralCategory; +pub use crate::category::GeneralCategory; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/common/src/lib.rs b/unic/ucd/common/src/lib.rs index 8114bf6b..ae8425c4 100644 --- a/unic/ucd/common/src/lib.rs +++ b/unic/ucd/common/src/lib.rs @@ -32,26 +32,26 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; // == UCD-defined: types and methods == pub mod alphabetic; -pub use alphabetic::{is_alphabetic, Alphabetic}; +pub use crate::alphabetic::{is_alphabetic, Alphabetic}; pub mod white_space; -pub use white_space::{is_white_space, WhiteSpace}; +pub use crate::white_space::{is_white_space, WhiteSpace}; // == Non-UCD-defined: methods only == pub mod alphanumeric; -pub use alphanumeric::is_alphanumeric; +pub use crate::alphanumeric::is_alphanumeric; pub mod control; -pub use control::is_control; +pub use crate::control::is_control; pub mod numeric; -pub use numeric::is_numeric; +pub use crate::numeric::is_numeric; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/hangul/src/lib.rs b/unic/ucd/hangul/src/lib.rs index de6da2bf..6ea351ce 100644 --- a/unic/ucd/hangul/src/lib.rs +++ b/unic/ucd/hangul/src/lib.rs @@ -50,10 +50,10 @@ extern crate unic_ucd_version; use unic_ucd_version::UnicodeVersion; mod hangul; -pub use hangul::{compose_syllable, decompose_syllable, is_syllable}; +pub use crate::hangul::{compose_syllable, decompose_syllable, is_syllable}; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; /// The [Unicode version](https://www.unicode.org/versions/) of data pub const UNICODE_VERSION: UnicodeVersion = include!("../tables/unicode_version.rsv"); diff --git a/unic/ucd/ident/src/lib.rs b/unic/ucd/ident/src/lib.rs index f2b487ee..a945ccba 100644 --- a/unic/ucd/ident/src/lib.rs +++ b/unic/ucd/ident/src/lib.rs @@ -40,7 +40,7 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; #[cfg(feature = "xid")] mod xid { @@ -72,7 +72,7 @@ mod xid { } } #[cfg(feature = "xid")] -pub use xid::{is_xid_continue, is_xid_start, XidContinue, XidStart}; +pub use crate::xid::{is_xid_continue, is_xid_start, XidContinue, XidStart}; #[cfg(feature = "id")] mod id { @@ -104,7 +104,7 @@ mod id { } } #[cfg(feature = "id")] -pub use id::{is_id_continue, is_id_start, IdContinue, IdStart}; +pub use crate::id::{is_id_continue, is_id_start, IdContinue, IdStart}; #[cfg(feature = "pattern")] mod pattern { @@ -136,7 +136,12 @@ mod pattern { } } #[cfg(feature = "pattern")] -pub use pattern::{is_pattern_syntax, is_pattern_whitespace, PatternSyntax, PatternWhitespace}; +pub use crate::pattern::{ + is_pattern_syntax, + is_pattern_whitespace, + PatternSyntax, + PatternWhitespace, +}; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/name/src/lib.rs b/unic/ucd/name/src/lib.rs index 5f132911..c7ecb9db 100644 --- a/unic/ucd/name/src/lib.rs +++ b/unic/ucd/name/src/lib.rs @@ -28,10 +28,10 @@ extern crate unic_ucd_hangul; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod name; -pub use name::Name; +pub use crate::name::Name; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/normal/src/composition.rs b/unic/ucd/normal/src/composition.rs index e06cfcbd..42d81406 100644 --- a/unic/ucd/normal/src/composition.rs +++ b/unic/ucd/normal/src/composition.rs @@ -12,9 +12,9 @@ use unic_char_property::tables::CharDataTable; pub mod data { - use decomposition_type::long_names::*; + use crate::decomposition_type::long_names::*; + use crate::DecompositionType; use unic_char_property::tables::CharDataTable; - use DecompositionType; pub const CANONICAL_COMPOSITION_MAPPING: CharDataTable> = include!("../tables/canonical_composition_mapping.rsv"); diff --git a/unic/ucd/normal/src/decomposition.rs b/unic/ucd/normal/src/decomposition.rs index 749c11ff..d4b92794 100644 --- a/unic/ucd/normal/src/decomposition.rs +++ b/unic/ucd/normal/src/decomposition.rs @@ -11,7 +11,7 @@ use core::ops::FnMut; -use composition::{canonical_decomposition, compatibility_decomposition}; +use crate::composition::{canonical_decomposition, compatibility_decomposition}; use unic_ucd_hangul::{decompose_syllable, is_syllable}; diff --git a/unic/ucd/normal/src/decomposition_type.rs b/unic/ucd/normal/src/decomposition_type.rs index 05b3d300..ab985923 100644 --- a/unic/ucd/normal/src/decomposition_type.rs +++ b/unic/ucd/normal/src/decomposition_type.rs @@ -14,7 +14,7 @@ use unic_char_property::PartialCharProperty; use unic_ucd_hangul::is_syllable; -use composition::{canonical_decomposition, data}; +use crate::composition::{canonical_decomposition, data}; char_property! { /// Represents the Unicode character diff --git a/unic/ucd/normal/src/lib.rs b/unic/ucd/normal/src/lib.rs index c6ab768f..24dedf03 100644 --- a/unic/ucd/normal/src/lib.rs +++ b/unic/ucd/normal/src/lib.rs @@ -42,26 +42,26 @@ extern crate unic_ucd_hangul; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod canonical_combining_class; -pub use canonical_combining_class::CanonicalCombiningClass; +pub use crate::canonical_combining_class::CanonicalCombiningClass; mod composition; -pub use composition::{ +pub use crate::composition::{ canonical_composition, canonical_decomposition, compatibility_decomposition, }; mod decomposition; -pub use decomposition::{decompose_canonical, decompose_compatible}; +pub use crate::decomposition::{decompose_canonical, decompose_compatible}; mod gen_cat; -pub use gen_cat::is_combining_mark; +pub use crate::gen_cat::is_combining_mark; mod decomposition_type; -pub use decomposition_type::DecompositionType; +pub use crate::decomposition_type::DecompositionType; use unic_ucd_hangul::compose_syllable; diff --git a/unic/ucd/segment/src/lib.rs b/unic/ucd/segment/src/lib.rs index fb6e9e21..1693b76e 100644 --- a/unic/ucd/segment/src/lib.rs +++ b/unic/ucd/segment/src/lib.rs @@ -32,16 +32,16 @@ extern crate unic_char_range; extern crate unic_ucd_version; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; pub mod grapheme_cluster_break; -pub use grapheme_cluster_break::GraphemeClusterBreak; +pub use crate::grapheme_cluster_break::GraphemeClusterBreak; pub mod sentence_break; -pub use sentence_break::SentenceBreak; +pub use crate::sentence_break::SentenceBreak; pub mod word_break; -pub use word_break::WordBreak; +pub use crate::word_break::WordBreak; use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/segment/tests/conformance_tests.rs b/unic/ucd/segment/tests/conformance_tests.rs index 26e85ad2..7abfe423 100644 --- a/unic/ucd/segment/tests/conformance_tests.rs +++ b/unic/ucd/segment/tests/conformance_tests.rs @@ -18,8 +18,8 @@ use unic_ucd_segment::word_break::{self, WordBreak}; #[test] fn test_grapheme_cluster_break_conformance() { - use grapheme_cluster_break::abbr_names::*; - use grapheme_cluster_break::long_names::*; + use crate::grapheme_cluster_break::abbr_names::*; + use crate::grapheme_cluster_break::long_names::*; const TEST_DATA: CharDataTable = include!("tables/grapheme_cluster_break_test_data.rsv"); @@ -31,10 +31,10 @@ fn test_grapheme_cluster_break_conformance() { #[test] fn test_word_break_conformance() { - use word_break::abbr_names::*; - use word_break::long_names::*; + use crate::word_break::abbr_names::*; + use crate::word_break::long_names::*; // The test data file uses some unexpected names for some values - use word_break::long_names::{Extend as Extend_FE, Format as Format_FE, ZWJ as ZWJ_FE}; + use crate::word_break::long_names::{Extend as Extend_FE, Format as Format_FE, ZWJ as ZWJ_FE}; const TEST_DATA: CharDataTable = include!("tables/word_break_test_data.rsv"); diff --git a/unic/ucd/src/lib.rs b/unic/ucd/src/lib.rs index 82d4586b..8cbde963 100644 --- a/unic/ucd/src/lib.rs +++ b/unic/ucd/src/lib.rs @@ -38,18 +38,18 @@ pub extern crate unic_ucd_name as name; pub extern crate unic_ucd_normal as normal; pub extern crate unic_ucd_segment as segment; -pub use version::UnicodeVersion; +pub use crate::version::UnicodeVersion; /// The [Unicode version](https://www.unicode.org/versions/) of data -pub use version::UNICODE_VERSION; +pub use crate::version::UNICODE_VERSION; -pub use age::{Age, CharAge}; +pub use crate::age::{Age, CharAge}; -pub use block::{Block, BlockIter}; +pub use crate::block::{Block, BlockIter}; -pub use bidi::{is_bidi_mirrored, BidiClass, CharBidiClass, StrBidiClass}; +pub use crate::bidi::{is_bidi_mirrored, BidiClass, CharBidiClass, StrBidiClass}; -pub use case::{ +pub use crate::case::{ changes_when_casefolded, changes_when_casemapped, changes_when_lowercased, @@ -70,15 +70,15 @@ pub use case::{ Uppercase, }; -pub use category::GeneralCategory; +pub use crate::category::GeneralCategory; -pub use common::{is_alphabetic, is_white_space, Alphabetic, WhiteSpace}; +pub use crate::common::{is_alphabetic, is_white_space, Alphabetic, WhiteSpace}; -pub use name::Name; +pub use crate::name::Name; -pub use normal::CanonicalCombiningClass; +pub use crate::normal::CanonicalCombiningClass; -pub use segment::{GraphemeClusterBreak, SentenceBreak, WordBreak}; +pub use crate::segment::{GraphemeClusterBreak, SentenceBreak, WordBreak}; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/version/src/lib.rs b/unic/ucd/version/src/lib.rs index 49080026..783be37b 100644 --- a/unic/ucd/version/src/lib.rs +++ b/unic/ucd/version/src/lib.rs @@ -28,7 +28,7 @@ extern crate unic_common; pub use unic_common::version::UnicodeVersion; mod pkg_info; -pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; +pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; mod unicode_version; -pub use unicode_version::UNICODE_VERSION; +pub use crate::unicode_version::UNICODE_VERSION; From b88ce4fe2434811c0f45714560d527c2d0dc448b Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 07:42:08 -0800 Subject: [PATCH 4/6] Cargo: Set edition to 2018 --- apps/cli/Cargo.toml | 1 + gen/Cargo.toml | 1 + unic/Cargo.toml | 1 + unic/bidi/Cargo.toml | 1 + unic/char/Cargo.toml | 1 + unic/char/basics/Cargo.toml | 1 + unic/char/property/Cargo.toml | 1 + unic/char/range/Cargo.toml | 1 + unic/common/Cargo.toml | 1 + unic/emoji/Cargo.toml | 1 + unic/emoji/char/Cargo.toml | 1 + unic/idna/Cargo.toml | 1 + unic/idna/mapping/Cargo.toml | 1 + unic/idna/punycode/Cargo.toml | 1 + unic/normal/Cargo.toml | 1 + unic/segment/Cargo.toml | 1 + unic/ucd/Cargo.toml | 1 + unic/ucd/age/Cargo.toml | 1 + unic/ucd/bidi/Cargo.toml | 1 + unic/ucd/block/Cargo.toml | 1 + unic/ucd/case/Cargo.toml | 1 + unic/ucd/category/Cargo.toml | 1 + unic/ucd/common/Cargo.toml | 1 + unic/ucd/hangul/Cargo.toml | 1 + unic/ucd/ident/Cargo.toml | 1 + unic/ucd/name/Cargo.toml | 1 + unic/ucd/normal/Cargo.toml | 1 + unic/ucd/segment/Cargo.toml | 1 + unic/ucd/version/Cargo.toml | 1 + 29 files changed, 29 insertions(+) diff --git a/apps/cli/Cargo.toml b/apps/cli/Cargo.toml index 2f35302c..a1ae308c 100644 --- a/apps/cli/Cargo.toml +++ b/apps/cli/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-cli" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/gen/Cargo.toml b/gen/Cargo.toml index f5f1d7cf..2b05c91b 100644 --- a/gen/Cargo.toml +++ b/gen/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-gen" version = "0.0.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/Cargo.toml b/unic/Cargo.toml index 435b864a..c97961b1 100644 --- a/unic/Cargo.toml +++ b/unic/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/bidi/Cargo.toml b/unic/bidi/Cargo.toml index 2ea03249..b183fc96 100644 --- a/unic/bidi/Cargo.toml +++ b/unic/bidi/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-bidi" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/char/Cargo.toml b/unic/char/Cargo.toml index 06324952..3d6d62fa 100644 --- a/unic/char/Cargo.toml +++ b/unic/char/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-char" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/char/basics/Cargo.toml b/unic/char/basics/Cargo.toml index 12d4863c..cde43514 100644 --- a/unic/char/basics/Cargo.toml +++ b/unic/char/basics/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-char-basics" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/char/property/Cargo.toml b/unic/char/property/Cargo.toml index 8a9c9c40..3e6ce0c8 100644 --- a/unic/char/property/Cargo.toml +++ b/unic/char/property/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-char-property" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/char/range/Cargo.toml b/unic/char/range/Cargo.toml index 54e9085a..294be0d5 100644 --- a/unic/char/range/Cargo.toml +++ b/unic/char/range/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-char-range" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/common/Cargo.toml b/unic/common/Cargo.toml index 572b3c99..0449fcb7 100644 --- a/unic/common/Cargo.toml +++ b/unic/common/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-common" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/emoji/Cargo.toml b/unic/emoji/Cargo.toml index 53ab5b98..46fbf71f 100644 --- a/unic/emoji/Cargo.toml +++ b/unic/emoji/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-emoji" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/emoji/char/Cargo.toml b/unic/emoji/char/Cargo.toml index 296b612e..e6368ce0 100644 --- a/unic/emoji/char/Cargo.toml +++ b/unic/emoji/char/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-emoji-char" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/idna/Cargo.toml b/unic/idna/Cargo.toml index 5b3411dd..aad6f9de 100644 --- a/unic/idna/Cargo.toml +++ b/unic/idna/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-idna" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/idna/mapping/Cargo.toml b/unic/idna/mapping/Cargo.toml index 827329dd..c3e1cc41 100644 --- a/unic/idna/mapping/Cargo.toml +++ b/unic/idna/mapping/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-idna-mapping" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/idna/punycode/Cargo.toml b/unic/idna/punycode/Cargo.toml index a6c4004e..e8d805cd 100644 --- a/unic/idna/punycode/Cargo.toml +++ b/unic/idna/punycode/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-idna-punycode" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/normal/Cargo.toml b/unic/normal/Cargo.toml index aeb264c7..ebb83bb8 100644 --- a/unic/normal/Cargo.toml +++ b/unic/normal/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-normal" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/segment/Cargo.toml b/unic/segment/Cargo.toml index 2f5922f6..6bee6524 100644 --- a/unic/segment/Cargo.toml +++ b/unic/segment/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-segment" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/Cargo.toml b/unic/ucd/Cargo.toml index 45131893..39b2a7bc 100644 --- a/unic/ucd/Cargo.toml +++ b/unic/ucd/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/age/Cargo.toml b/unic/ucd/age/Cargo.toml index 8162d54e..9f99a142 100644 --- a/unic/ucd/age/Cargo.toml +++ b/unic/ucd/age/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-age" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/bidi/Cargo.toml b/unic/ucd/bidi/Cargo.toml index f6984dc7..d1f992b2 100644 --- a/unic/ucd/bidi/Cargo.toml +++ b/unic/ucd/bidi/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-bidi" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/block/Cargo.toml b/unic/ucd/block/Cargo.toml index 2b58a55b..f0265b6c 100644 --- a/unic/ucd/block/Cargo.toml +++ b/unic/ucd/block/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-block" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/case/Cargo.toml b/unic/ucd/case/Cargo.toml index 11ed7a64..7ba49cda 100644 --- a/unic/ucd/case/Cargo.toml +++ b/unic/ucd/case/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-case" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/category/Cargo.toml b/unic/ucd/category/Cargo.toml index 1ff8adbe..7c82d2ac 100644 --- a/unic/ucd/category/Cargo.toml +++ b/unic/ucd/category/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-category" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/common/Cargo.toml b/unic/ucd/common/Cargo.toml index 21c99356..e6d58890 100644 --- a/unic/ucd/common/Cargo.toml +++ b/unic/ucd/common/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-common" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/hangul/Cargo.toml b/unic/ucd/hangul/Cargo.toml index 8210737a..4e703d56 100644 --- a/unic/ucd/hangul/Cargo.toml +++ b/unic/ucd/hangul/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-hangul" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/ident/Cargo.toml b/unic/ucd/ident/Cargo.toml index 2c3b70a5..3ac72ad5 100644 --- a/unic/ucd/ident/Cargo.toml +++ b/unic/ucd/ident/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-ident" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/name/Cargo.toml b/unic/ucd/name/Cargo.toml index b8eafba0..f48443f2 100644 --- a/unic/ucd/name/Cargo.toml +++ b/unic/ucd/name/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-name" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/normal/Cargo.toml b/unic/ucd/normal/Cargo.toml index b7e08001..02e7144f 100644 --- a/unic/ucd/normal/Cargo.toml +++ b/unic/ucd/normal/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-normal" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/segment/Cargo.toml b/unic/ucd/segment/Cargo.toml index f177cd0c..ba710ada 100644 --- a/unic/ucd/segment/Cargo.toml +++ b/unic/ucd/segment/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-segment" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" diff --git a/unic/ucd/version/Cargo.toml b/unic/ucd/version/Cargo.toml index 0cd1ee71..80349c99 100644 --- a/unic/ucd/version/Cargo.toml +++ b/unic/ucd/version/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "unic-ucd-version" version = "0.8.0" +edition = "2018" authors = ["The UNIC Project Developers"] repository = "https://github.com/open-i18n/rust-unic/" license = "MIT/Apache-2.0" From 5ea8fdcdc77fcf2673d8d59ff166ca164e4979de Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 08:15:52 -0800 Subject: [PATCH 5/6] all: cargo fix --all-features --edition-idioms --- apps/cli/src/bin/unic-inspector.rs | 4 +-- apps/cli/src/bin/unic-versions.rs | 2 +- apps/cli/src/lib.rs | 2 +- apps/cli/tests/quickcheck.rs | 2 +- apps/cli/tests/test_unic-echo.rs | 2 +- gen/src/main.rs | 4 +-- gen/src/writer/ucd/name.rs | 2 +- gen/src/writer/utils/tables/direct.rs | 4 +-- gen/src/writer/utils/tables/mod.rs | 6 ++-- gen/src/writer/utils/tables/range.rs | 4 +-- unic/bidi/benches/bidi_basic_benches.rs | 2 +- unic/bidi/benches/bidi_udhr_benches.rs | 2 +- unic/bidi/src/bidi_info.rs | 8 ++--- unic/bidi/src/level.rs | 2 +- unic/bidi/src/lib.rs | 5 ++- unic/bidi/tests/conformance_tests.rs | 4 +-- unic/bidi/tests/unicode_version_tests.rs | 4 +-- unic/char/basics/src/noncharacter.rs | 36 +++++++++---------- unic/char/basics/src/notation.rs | 2 +- unic/char/basics/src/private_use.rs | 6 ++-- unic/char/basics/tests/basic_tests.rs | 2 +- unic/char/basics/tests/coverage_tests.rs | 4 +-- unic/char/property/src/tables.rs | 2 +- unic/char/property/tests/tables_tests.rs | 2 +- unic/char/range/benches/benchmarks.rs | 2 +- unic/char/range/src/lib.rs | 3 +- unic/char/range/src/par_iter.rs | 2 +- unic/char/range/tests/iter_tests.rs | 2 +- unic/char/src/lib.rs | 6 ++-- unic/common/src/version.rs | 2 +- unic/emoji/char/src/lib.rs | 2 +- unic/emoji/char/tests/emoji_version_tests.rs | 4 +-- unic/emoji/src/lib.rs | 2 +- unic/examples/bidi_example.rs | 2 +- unic/examples/normal_example.rs | 2 +- unic/examples/ucd_bidi_traits_example.rs | 2 +- unic/idna/mapping/src/lib.rs | 4 +-- .../mapping/tests/unicode_version_tests.rs | 4 +-- unic/idna/punycode/src/lib.rs | 10 +++--- unic/idna/punycode/tests/punycode_tests.rs | 4 +-- unic/idna/src/lib.rs | 10 +++--- unic/idna/tests/conformance_tests.rs | 2 +- unic/idna/tests/unicode_version_tests.rs | 4 +-- unic/normal/src/decompose.rs | 2 +- unic/normal/src/lib.rs | 2 +- unic/normal/src/recompose.rs | 2 +- unic/normal/tests/conformance_tests.rs | 2 +- unic/normal/tests/unicode_version_tests.rs | 4 +-- unic/segment/src/grapheme.rs | 8 ++--- unic/segment/src/lib.rs | 5 ++- unic/segment/src/word.rs | 6 ++-- unic/segment/tests/basic_example.rs | 4 +-- .../grapheme_cluster_conformance_tests.rs | 2 +- unic/segment/tests/quickcheck_tests.rs | 2 +- unic/segment/tests/words_conformance_tests.rs | 2 +- unic/src/lib.rs | 14 ++++---- unic/tests/basics_test.rs | 2 +- unic/tests/char_range_integration_tests.rs | 4 +-- unic/ucd/age/src/lib.rs | 4 +-- unic/ucd/age/tests/age_tests.rs | 2 +- unic/ucd/age/tests/unicode_version_tests.rs | 4 +-- unic/ucd/bidi/src/lib.rs | 2 +- unic/ucd/bidi/tests/basic_tests.rs | 2 +- unic/ucd/bidi/tests/unicode_version_tests.rs | 4 +-- unic/ucd/block/src/lib.rs | 4 +-- unic/ucd/block/tests/basic_tests.rs | 2 +- unic/ucd/block/tests/unicode_version_tests.rs | 4 +-- unic/ucd/case/src/lib.rs | 2 +- unic/ucd/case/tests/unicode_version_tests.rs | 4 +-- unic/ucd/category/src/lib.rs | 2 +- unic/ucd/category/tests/basic_tests.rs | 2 +- .../category/tests/major_category_tests.rs | 4 +-- .../category/tests/unicode_version_tests.rs | 4 +-- unic/ucd/common/src/lib.rs | 2 +- unic/ucd/common/tests/consistency_tests.rs | 4 +-- .../ucd/common/tests/unicode_version_tests.rs | 4 +-- ...wercase_chars_with_identity_touppercase.rs | 8 ++--- ...percase_chars_with_identity_tolowercase.rs | 8 ++--- unic/ucd/hangul/src/lib.rs | 2 +- unic/ucd/hangul/tests/basic_tests.rs | 2 +- .../ucd/hangul/tests/unicode_version_tests.rs | 4 +-- unic/ucd/ident/src/lib.rs | 2 +- unic/ucd/ident/tests/lexical_class_tests.rs | 10 +++--- unic/ucd/ident/tests/unicode_version_tests.rs | 4 +-- unic/ucd/name/src/lib.rs | 6 ++-- unic/ucd/name/src/name.rs | 24 ++++++------- unic/ucd/name/tests/basic_tests.rs | 2 +- unic/ucd/name/tests/unicode_version_tests.rs | 4 +-- .../normal/src/canonical_combining_class.rs | 2 +- unic/ucd/normal/src/gen_cat.rs | 2 +- unic/ucd/normal/src/lib.rs | 4 +-- unic/ucd/normal/tests/basic_tests.rs | 2 +- unic/ucd/normal/tests/conformance_tests.rs | 2 +- .../tests/excluded_composition_tests.rs | 2 +- .../ucd/normal/tests/unicode_version_tests.rs | 4 +-- unic/ucd/segment/src/lib.rs | 2 +- unic/ucd/segment/tests/basic_tests.rs | 2 +- unic/ucd/segment/tests/conformance_tests.rs | 4 +-- .../segment/tests/unicode_version_tests.rs | 4 +-- unic/ucd/src/lib.rs | 26 +++++++------- .../ucd/tests/bidi_class_consistency_tests.rs | 2 +- unic/ucd/version/src/lib.rs | 2 +- unic/ucd/version/tests/basic_tests.rs | 2 +- 103 files changed, 217 insertions(+), 220 deletions(-) diff --git a/apps/cli/src/bin/unic-inspector.rs b/apps/cli/src/bin/unic-inspector.rs index 1e9b1e94..2df34f19 100644 --- a/apps/cli/src/bin/unic-inspector.rs +++ b/apps/cli/src/bin/unic-inspector.rs @@ -14,8 +14,8 @@ extern crate clap; #[macro_use] extern crate prettytable; -extern crate unic; -extern crate unic_cli; + + use clap::Arg; use prettytable::format::TableFormat; diff --git a/apps/cli/src/bin/unic-versions.rs b/apps/cli/src/bin/unic-versions.rs index 4afc322b..7f0522ac 100644 --- a/apps/cli/src/bin/unic-versions.rs +++ b/apps/cli/src/bin/unic-versions.rs @@ -12,7 +12,7 @@ //! Command-line tool to list versions of UNIC components. -extern crate unic; +use unic; macro_rules! print_component_desc { ( $component:tt ) => { diff --git a/apps/cli/src/lib.rs b/apps/cli/src/lib.rs index fb9396e3..c192a318 100644 --- a/apps/cli/src/lib.rs +++ b/apps/cli/src/lib.rs @@ -10,7 +10,7 @@ #[macro_use] extern crate lazy_static; -extern crate regex; + pub mod parsers; pub mod writers; diff --git a/apps/cli/tests/quickcheck.rs b/apps/cli/tests/quickcheck.rs index 2c79fdbc..d7ef26d3 100644 --- a/apps/cli/tests/quickcheck.rs +++ b/apps/cli/tests/quickcheck.rs @@ -11,7 +11,7 @@ #[macro_use] extern crate quickcheck; -extern crate unic_cli; + use unic_cli::parsers; use unic_cli::writers; diff --git a/apps/cli/tests/test_unic-echo.rs b/apps/cli/tests/test_unic-echo.rs index 08f62b3c..1f20019f 100644 --- a/apps/cli/tests/test_unic-echo.rs +++ b/apps/cli/tests/test_unic-echo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate assert_cli; + use assert_cli::Assert; diff --git a/gen/src/main.rs b/gen/src/main.rs index 58b4bff5..d2f5ed96 100644 --- a/gen/src/main.rs +++ b/gen/src/main.rs @@ -20,8 +20,8 @@ extern crate lazy_static; #[macro_use] extern crate matches; -extern crate itertools; -extern crate regex; + + mod source; mod writer; diff --git a/gen/src/writer/ucd/name.rs b/gen/src/writer/ucd/name.rs index a27b9cba..2946ae14 100644 --- a/gen/src/writer/ucd/name.rs +++ b/gen/src/writer/ucd/name.rs @@ -34,7 +34,7 @@ struct NameRecord<'a> { fn emit_name_tables(dir: &Path) { let mut values: BTreeSet<&str> = BTreeSet::default(); - let map: BTreeMap = UNICODE_DATA + let map: BTreeMap> = UNICODE_DATA .entries .iter() .filter(|x| !x.name.starts_with('<')) diff --git a/gen/src/writer/utils/tables/direct.rs b/gen/src/writer/utils/tables/direct.rs index ffdd5a0f..cf8b768b 100644 --- a/gen/src/writer/utils/tables/direct.rs +++ b/gen/src/writer/utils/tables/direct.rs @@ -18,13 +18,13 @@ pub trait ToDirectCharTable { /// Convert this mapping to a `String`. fn to_direct_char_table(&self, display_fn: F) -> String where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result; + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result; } impl ToDirectCharTable for BTreeMap { fn to_direct_char_table(&self, display_fn: F) -> String where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result, + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result, { let entries = self.iter(); let mut out = String::from("CharDataTable::Direct(&[\n"); diff --git a/gen/src/writer/utils/tables/mod.rs b/gen/src/writer/utils/tables/mod.rs index 857d7ed5..a753013f 100644 --- a/gen/src/writer/utils/tables/mod.rs +++ b/gen/src/writer/utils/tables/mod.rs @@ -21,13 +21,13 @@ pub use self::set::ToRangeCharSet; #[derive(Debug)] struct DisplayWrapper<'a, T: 'a, F: 'a>(&'a T, &'a F) where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result; + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result; impl<'a, T, F> fmt::Display for DisplayWrapper<'a, T, F> where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result, + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result, { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.1(self.0, f) } } diff --git a/gen/src/writer/utils/tables/range.rs b/gen/src/writer/utils/tables/range.rs index 45d8f0f6..a6e9538e 100644 --- a/gen/src/writer/utils/tables/range.rs +++ b/gen/src/writer/utils/tables/range.rs @@ -18,13 +18,13 @@ pub trait ToRangeCharTable { /// Convert this mapping to a `String`. fn to_range_char_table(&self, display_fn: F) -> String where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result; + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result; } impl ToRangeCharTable for BTreeMap { fn to_range_char_table(&self, display_fn: F) -> String where - F: Fn(&T, &mut fmt::Formatter) -> fmt::Result, + F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result, { let mut entries = self.iter(); let mut out = String::from("CharDataTable::Range(&[\n"); diff --git a/unic/bidi/benches/bidi_basic_benches.rs b/unic/bidi/benches/bidi_basic_benches.rs index 27f65f14..e43dbd7b 100644 --- a/unic/bidi/benches/bidi_basic_benches.rs +++ b/unic/bidi/benches/bidi_basic_benches.rs @@ -13,7 +13,7 @@ #![feature(test)] extern crate test; -extern crate unic_bidi; + use test::Bencher; diff --git a/unic/bidi/benches/bidi_udhr_benches.rs b/unic/bidi/benches/bidi_udhr_benches.rs index c7ab176f..e7d14dc4 100644 --- a/unic/bidi/benches/bidi_udhr_benches.rs +++ b/unic/bidi/benches/bidi_udhr_benches.rs @@ -13,7 +13,7 @@ #![feature(test)] extern crate test; -extern crate unic_bidi; + use test::Bencher; diff --git a/unic/bidi/src/bidi_info.rs b/unic/bidi/src/bidi_info.rs index 0edafaf6..5acebcc8 100644 --- a/unic/bidi/src/bidi_info.rs +++ b/unic/bidi/src/bidi_info.rs @@ -65,7 +65,7 @@ impl<'text> InitialInfo<'text> { /// Also sets the class for each First Strong Isolate initiator (FSI) to LRI or RLI if a strong /// character is found before the matching PDI. If no strong character is found, the class will /// remain FSI, and it's up to later stages to treat these as LRI when needed. - pub fn new(text: &str, default_para_level: Option) -> InitialInfo { + pub fn new(text: &str, default_para_level: Option) -> InitialInfo<'_> { let mut original_classes = Vec::with_capacity(text.len()); // The stack contains the starting byte index for each nested isolate we're inside. @@ -174,7 +174,7 @@ impl<'text> BidiInfo<'text> { /// text that is entirely LTR. See the `nsBidi` class from Gecko for comparison. /// /// TODO: Support auto-RTL base direction - pub fn new(text: &str, default_para_level: Option) -> BidiInfo { + pub fn new(text: &str, default_para_level: Option) -> BidiInfo<'_> { let InitialInfo { original_classes, paragraphs, @@ -400,7 +400,7 @@ impl<'text> BidiInfo<'text> { } impl<'text> fmt::Display for BidiInfo<'text> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, "{} paragraphs with a maximum bidirectional level of {}", @@ -606,7 +606,7 @@ mod tests { assert_eq!(BidiInfo::new("אבּג\n123", None).has_rtl(), true); } - fn reorder_paras(text: &str) -> Vec> { + fn reorder_paras(text: &str) -> Vec> { let bidi_info = BidiInfo::new(text, None); bidi_info .paragraphs diff --git a/unic/bidi/src/level.rs b/unic/bidi/src/level.rs index 4a6c2bf1..b62e14e1 100644 --- a/unic/bidi/src/level.rs +++ b/unic/bidi/src/level.rs @@ -202,7 +202,7 @@ impl Level { } impl fmt::Display for Level { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0) } } diff --git a/unic/bidi/src/lib.rs b/unic/bidi/src/lib.rs index 475b82f9..93a0231a 100644 --- a/unic/bidi/src/lib.rs +++ b/unic/bidi/src/lib.rs @@ -71,7 +71,7 @@ //! //! [tr9]: https://www.unicode.org/reports/tr9/ -extern crate unic_ucd_bidi; + #[macro_use] extern crate matches; @@ -80,8 +80,7 @@ extern crate matches; #[macro_use] extern crate serde; -#[cfg(all(feature = "serde", test))] -extern crate serde_test; + pub use unic_ucd_bidi::UNICODE_VERSION; pub use unic_ucd_bidi::{bidi_class, BidiClass, BidiClassCategory}; diff --git a/unic/bidi/tests/conformance_tests.rs b/unic/bidi/tests/conformance_tests.rs index 88c88144..bf67fbec 100644 --- a/unic/bidi/tests/conformance_tests.rs +++ b/unic/bidi/tests/conformance_tests.rs @@ -11,8 +11,8 @@ #![cfg(test)] -extern crate unic_bidi; -extern crate unic_char_property; + + use unic_bidi::{format_chars, level, BidiClass, BidiInfo, Level}; diff --git a/unic/bidi/tests/unicode_version_tests.rs b/unic/bidi/tests/unicode_version_tests.rs index 77b99c05..335976e0 100644 --- a/unic/bidi/tests/unicode_version_tests.rs +++ b/unic/bidi/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_bidi; -extern crate unic_ucd_version; +use unic_bidi; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/char/basics/src/noncharacter.rs b/unic/char/basics/src/noncharacter.rs index 87791651..ff841ea8 100644 --- a/unic/char/basics/src/noncharacter.rs +++ b/unic/char/basics/src/noncharacter.rs @@ -26,24 +26,24 @@ /// - https://www.unicode.org/faq/private_use.html#noncharacters pub fn is_noncharacter(codepoint: char) -> bool { match codepoint { - '\u{fdd0}'...'\u{fdef}' - | '\u{fffe}'...'\u{ffff}' - | '\u{1_fffe}'...'\u{1_ffff}' - | '\u{2_fffe}'...'\u{2_ffff}' - | '\u{3_fffe}'...'\u{3_ffff}' - | '\u{4_fffe}'...'\u{4_ffff}' - | '\u{5_fffe}'...'\u{5_ffff}' - | '\u{6_fffe}'...'\u{6_ffff}' - | '\u{7_fffe}'...'\u{7_ffff}' - | '\u{8_fffe}'...'\u{8_ffff}' - | '\u{9_fffe}'...'\u{9_ffff}' - | '\u{A_fffe}'...'\u{A_ffff}' - | '\u{B_fffe}'...'\u{B_ffff}' - | '\u{C_fffe}'...'\u{C_ffff}' - | '\u{D_fffe}'...'\u{D_ffff}' - | '\u{E_fffe}'...'\u{E_ffff}' - | '\u{F_fffe}'...'\u{F_ffff}' - | '\u{10_fffe}'...'\u{10_ffff}' => true, + '\u{fdd0}'..='\u{fdef}' + | '\u{fffe}'..='\u{ffff}' + | '\u{1_fffe}'..='\u{1_ffff}' + | '\u{2_fffe}'..='\u{2_ffff}' + | '\u{3_fffe}'..='\u{3_ffff}' + | '\u{4_fffe}'..='\u{4_ffff}' + | '\u{5_fffe}'..='\u{5_ffff}' + | '\u{6_fffe}'..='\u{6_ffff}' + | '\u{7_fffe}'..='\u{7_ffff}' + | '\u{8_fffe}'..='\u{8_ffff}' + | '\u{9_fffe}'..='\u{9_ffff}' + | '\u{A_fffe}'..='\u{A_ffff}' + | '\u{B_fffe}'..='\u{B_ffff}' + | '\u{C_fffe}'..='\u{C_ffff}' + | '\u{D_fffe}'..='\u{D_ffff}' + | '\u{E_fffe}'..='\u{E_ffff}' + | '\u{F_fffe}'..='\u{F_ffff}' + | '\u{10_fffe}'..='\u{10_ffff}' => true, _ => false, } } diff --git a/unic/char/basics/src/notation.rs b/unic/char/basics/src/notation.rs index 453c66ca..c8cb807e 100644 --- a/unic/char/basics/src/notation.rs +++ b/unic/char/basics/src/notation.rs @@ -29,7 +29,7 @@ pub struct UnicodeNotation { } impl fmt::Display for UnicodeNotation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "U+{:04X}", self.codepoint as u32) } } diff --git a/unic/char/basics/src/private_use.rs b/unic/char/basics/src/private_use.rs index f282febc..712b832c 100644 --- a/unic/char/basics/src/private_use.rs +++ b/unic/char/basics/src/private_use.rs @@ -26,9 +26,9 @@ /// - https://www.unicode.org/faq/private_use.html#private_use pub fn is_private_use(codepoint: char) -> bool { match codepoint { - '\u{e000}'...'\u{f8ff}' // 6,400 Plane 0 (BMP) chars - | '\u{f_0000}'...'\u{f_fffd}' // 65,534 Plane 15 chars - | '\u{10_0000}'...'\u{10_fffd}' // 65,534 Plane 16 chars + '\u{e000}'..='\u{f8ff}' // 6,400 Plane 0 (BMP) chars + | '\u{f_0000}'..='\u{f_fffd}' // 65,534 Plane 15 chars + | '\u{10_0000}'..='\u{10_fffd}' // 65,534 Plane 16 chars => { true } diff --git a/unic/char/basics/tests/basic_tests.rs b/unic/char/basics/tests/basic_tests.rs index a41301fd..6612ae6a 100644 --- a/unic/char/basics/tests/basic_tests.rs +++ b/unic/char/basics/tests/basic_tests.rs @@ -16,7 +16,7 @@ unsafe_code )] -extern crate unic_char_basics; + use unic_char_basics::unicode_notation; diff --git a/unic/char/basics/tests/coverage_tests.rs b/unic/char/basics/tests/coverage_tests.rs index da04fda1..3c3d80b7 100644 --- a/unic/char/basics/tests/coverage_tests.rs +++ b/unic/char/basics/tests/coverage_tests.rs @@ -16,8 +16,8 @@ unsafe_code )] -extern crate unic_char_basics; -extern crate unic_char_range; + + use unic_char_basics::{is_noncharacter, is_private_use}; use unic_char_range::CharRange; diff --git a/unic/char/property/src/tables.rs b/unic/char/property/src/tables.rs index 127b5e86..ab419d55 100644 --- a/unic/char/property/src/tables.rs +++ b/unic/char/property/src/tables.rs @@ -111,7 +111,7 @@ impl<'a, V: Copy> Iterator for CharDataTableIter<'a, V> { impl CharDataTable { /// Iterate over the entries in this table. Yields pairs `(CharRange, V)`. - pub fn iter(&self) -> CharDataTableIter { + pub fn iter(&self) -> CharDataTableIter<'_, V> { CharDataTableIter(self, 0) } } diff --git a/unic/char/property/tests/tables_tests.rs b/unic/char/property/tests/tables_tests.rs index 929abd53..e9e73267 100644 --- a/unic/char/property/tests/tables_tests.rs +++ b/unic/char/property/tests/tables_tests.rs @@ -11,7 +11,7 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_char_property; + use unic_char_property::tables::CharDataTable; diff --git a/unic/char/range/benches/benchmarks.rs b/unic/char/range/benches/benchmarks.rs index e945d7f7..fb606f8e 100644 --- a/unic/char/range/benches/benchmarks.rs +++ b/unic/char/range/benches/benchmarks.rs @@ -11,7 +11,7 @@ #![feature(test)] extern crate test; -extern crate unic_char_range; + use std::char; use unic_char_range::CharRange; diff --git a/unic/char/range/src/lib.rs b/unic/char/range/src/lib.rs index c8f4737f..f098230c 100644 --- a/unic/char/range/src/lib.rs +++ b/unic/char/range/src/lib.rs @@ -52,8 +52,7 @@ //! [`TrustedLen`]: https://doc.rust-lang.org/std/iter/trait.TrustedLen.html //! -#[cfg(feature = "std")] -extern crate core; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/char/range/src/par_iter.rs b/unic/char/range/src/par_iter.rs index bf5f4a30..5b40d221 100644 --- a/unic/char/range/src/par_iter.rs +++ b/unic/char/range/src/par_iter.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate rayon; +use rayon; use self::rayon::iter::plumbing::{Consumer, ProducerCallback, UnindexedConsumer}; use self::rayon::prelude::*; diff --git a/unic/char/range/tests/iter_tests.rs b/unic/char/range/tests/iter_tests.rs index d25e5e7a..5087deca 100644 --- a/unic/char/range/tests/iter_tests.rs +++ b/unic/char/range/tests/iter_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_char_range; + use std::{char, u32, vec}; diff --git a/unic/char/src/lib.rs b/unic/char/src/lib.rs index dcc6ea57..945b1f4d 100644 --- a/unic/char/src/lib.rs +++ b/unic/char/src/lib.rs @@ -21,9 +21,9 @@ )] #![forbid(unsafe_code)] -pub extern crate unic_char_basics as basics; -pub extern crate unic_char_property as property; -pub extern crate unic_char_range as range; +pub use unic_char_basics as basics; +pub use unic_char_property as property; +pub use unic_char_range as range; mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/common/src/version.rs b/unic/common/src/version.rs index f80b0c5d..6faf7def 100644 --- a/unic/common/src/version.rs +++ b/unic/common/src/version.rs @@ -40,7 +40,7 @@ pub struct UnicodeVersion { } impl fmt::Display for UnicodeVersion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}.{}.{}", self.major, self.minor, self.micro) } } diff --git a/unic/emoji/char/src/lib.rs b/unic/emoji/char/src/lib.rs index 6a26a67c..d2dbe5e0 100644 --- a/unic/emoji/char/src/lib.rs +++ b/unic/emoji/char/src/lib.rs @@ -24,7 +24,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/emoji/char/tests/emoji_version_tests.rs b/unic/emoji/char/tests/emoji_version_tests.rs index 071f98ad..856d5a89 100644 --- a/unic/emoji/char/tests/emoji_version_tests.rs +++ b/unic/emoji/char/tests/emoji_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_emoji_char; -extern crate unic_ucd_version; +use unic_emoji_char; +use unic_ucd_version; #[test] fn test_emoji_data_version_against_ucd_version() { diff --git a/unic/emoji/src/lib.rs b/unic/emoji/src/lib.rs index c2b82447..c6787387 100644 --- a/unic/emoji/src/lib.rs +++ b/unic/emoji/src/lib.rs @@ -23,7 +23,7 @@ //! This UNIC component implements character properties and algorithms from [UnicodeĀ® Technical //! Standard #51 - Unicode Emoji](http://unicode.org/reports/tr51/). -pub extern crate unic_emoji_char as char; +pub use unic_emoji_char as char; mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/examples/bidi_example.rs b/unic/examples/bidi_example.rs index 87aa14a9..c9ddc62f 100644 --- a/unic/examples/bidi_example.rs +++ b/unic/examples/bidi_example.rs @@ -11,7 +11,7 @@ #![forbid(unsafe_code)] -extern crate unic; + use unic::bidi::BidiInfo; diff --git a/unic/examples/normal_example.rs b/unic/examples/normal_example.rs index 7f803e80..378957be 100644 --- a/unic/examples/normal_example.rs +++ b/unic/examples/normal_example.rs @@ -11,7 +11,7 @@ #![forbid(unsafe_code)] -extern crate unic; + use unic::normal::StrNormalForm; use unic::ucd::normal::compose; diff --git a/unic/examples/ucd_bidi_traits_example.rs b/unic/examples/ucd_bidi_traits_example.rs index 5c0614c8..981829ea 100644 --- a/unic/examples/ucd_bidi_traits_example.rs +++ b/unic/examples/ucd_bidi_traits_example.rs @@ -11,7 +11,7 @@ #![forbid(unsafe_code)] -extern crate unic; + use unic::ucd::bidi::{BidiClass, BidiClassCategory, CharBidiClass, StrBidiClass}; diff --git a/unic/idna/mapping/src/lib.rs b/unic/idna/mapping/src/lib.rs index e04bd953..169c628f 100644 --- a/unic/idna/mapping/src/lib.rs +++ b/unic/idna/mapping/src/lib.rs @@ -23,10 +23,10 @@ //! //! * -extern crate unic_char_property; + #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod mapping; diff --git a/unic/idna/mapping/tests/unicode_version_tests.rs b/unic/idna/mapping/tests/unicode_version_tests.rs index 985ce7ee..47e1637a 100644 --- a/unic/idna/mapping/tests/unicode_version_tests.rs +++ b/unic/idna/mapping/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_idna_mapping; -extern crate unic_ucd_version; +use unic_idna_mapping; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/idna/punycode/src/lib.rs b/unic/idna/punycode/src/lib.rs index cbcd5862..11e9cf39 100644 --- a/unic/idna/punycode/src/lib.rs +++ b/unic/idna/punycode/src/lib.rs @@ -100,9 +100,9 @@ pub fn decode(input: &str) -> Option> { // which gets added to i. loop { let digit = match byte { - byte @ b'0'...b'9' => byte - b'0' + 26, - byte @ b'A'...b'Z' => byte - b'A', - byte @ b'a'...b'z' => byte - b'a', + byte @ b'0'..=b'9' => byte - b'0' + 26, + byte @ b'A'..=b'Z' => byte - b'A', + byte @ b'a'..=b'z' => byte - b'a', _ => return None, } as u32; if digit > (u32::MAX - i) / weight { @@ -235,8 +235,8 @@ pub fn encode(input: &[char]) -> Option { #[inline] fn value_to_digit(value: u32) -> char { match value { - 0...25 => (value as u8 + b'a') as char, // a..=z - 26...35 => (value as u8 - 26 + b'0') as char, // 0..=9 + 0..=25 => (value as u8 + b'a') as char, // a..=z + 26..=35 => (value as u8 - 26 + b'0') as char, // 0..=9 _ => panic!("Value larger than BASE: {}", value), } } diff --git a/unic/idna/punycode/tests/punycode_tests.rs b/unic/idna/punycode/tests/punycode_tests.rs index d3641f2c..dc46122e 100644 --- a/unic/idna/punycode/tests/punycode_tests.rs +++ b/unic/idna/punycode/tests/punycode_tests.rs @@ -9,8 +9,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate rustc_serialize; -extern crate unic_idna_punycode; + + use rustc_serialize::json::{self, Json}; use unic_idna_punycode::{decode, encode_str}; diff --git a/unic/idna/src/lib.rs b/unic/idna/src/lib.rs index c0f53cef..4fd8b1bf 100644 --- a/unic/idna/src/lib.rs +++ b/unic/idna/src/lib.rs @@ -47,12 +47,12 @@ #[macro_use] extern crate matches; -extern crate unic_normal; -extern crate unic_ucd_bidi; -extern crate unic_ucd_normal; -extern crate unic_idna_mapping as mapping; -extern crate unic_idna_punycode as punycode; + + + +use unic_idna_mapping as mapping; +use unic_idna_punycode as punycode; mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/idna/tests/conformance_tests.rs b/unic/idna/tests/conformance_tests.rs index 8c522056..fd8f8b37 100644 --- a/unic/idna/tests/conformance_tests.rs +++ b/unic/idna/tests/conformance_tests.rs @@ -6,7 +6,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_idna; +use unic_idna; use std::char; diff --git a/unic/idna/tests/unicode_version_tests.rs b/unic/idna/tests/unicode_version_tests.rs index e8b63b1b..eaf5b178 100644 --- a/unic/idna/tests/unicode_version_tests.rs +++ b/unic/idna/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_idna; -extern crate unic_ucd_version; +use unic_idna; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/normal/src/decompose.rs b/unic/normal/src/decompose.rs index 8dda4c4f..2516c91a 100644 --- a/unic/normal/src/decompose.rs +++ b/unic/normal/src/decompose.rs @@ -138,7 +138,7 @@ impl> Iterator for Decompositions { } impl + Clone> fmt::Display for Decompositions { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for c in self.clone() { f.write_char(c)?; } diff --git a/unic/normal/src/lib.rs b/unic/normal/src/lib.rs index 26fec136..02398261 100644 --- a/unic/normal/src/lib.rs +++ b/unic/normal/src/lib.rs @@ -36,7 +36,7 @@ //! } //! ``` -extern crate unic_ucd_normal; + mod decompose; mod recompose; diff --git a/unic/normal/src/recompose.rs b/unic/normal/src/recompose.rs index febe4fb4..dee52303 100644 --- a/unic/normal/src/recompose.rs +++ b/unic/normal/src/recompose.rs @@ -136,7 +136,7 @@ impl> Iterator for Recompositions { } impl + Clone> fmt::Display for Recompositions { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { for c in self.clone() { f.write_char(c)?; } diff --git a/unic/normal/tests/conformance_tests.rs b/unic/normal/tests/conformance_tests.rs index cb0f1516..6ba5cd07 100644 --- a/unic/normal/tests/conformance_tests.rs +++ b/unic/normal/tests/conformance_tests.rs @@ -11,7 +11,7 @@ #![cfg(test)] -extern crate unic_normal; + use unic_normal::StrNormalForm; diff --git a/unic/normal/tests/unicode_version_tests.rs b/unic/normal/tests/unicode_version_tests.rs index 0df4899d..e803a74d 100644 --- a/unic/normal/tests/unicode_version_tests.rs +++ b/unic/normal/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_normal; -extern crate unic_ucd_version; +use unic_normal; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/segment/src/grapheme.rs b/unic/segment/src/grapheme.rs index cbb67025..ec2ba33c 100644 --- a/unic/segment/src/grapheme.rs +++ b/unic/segment/src/grapheme.rs @@ -29,7 +29,7 @@ pub struct GraphemeIndices<'a> { impl<'a> GraphemeIndices<'a> { /// Create new iterator for *extended grapheme clusters*. #[inline] - pub fn new(s: &str) -> GraphemeIndices { + pub fn new(s: &str) -> GraphemeIndices<'_> { GraphemeIndices { start_offset: s.as_ptr() as usize, iter: Graphemes::new(s), @@ -38,7 +38,7 @@ impl<'a> GraphemeIndices<'a> { /// Create new iterator for *legacy grapheme clusters*. #[inline] - pub fn new_legacy(s: &str) -> GraphemeIndices { + pub fn new_legacy(s: &str) -> GraphemeIndices<'_> { GraphemeIndices { start_offset: s.as_ptr() as usize, iter: Graphemes::new_legacy(s), @@ -100,7 +100,7 @@ pub struct Graphemes<'a> { impl<'a> Graphemes<'a> { /// Create new iterator for *extended grapheme clusters*. #[inline] - pub fn new(s: &str) -> Graphemes { + pub fn new(s: &str) -> Graphemes<'_> { let len = s.len(); Graphemes { string: s, @@ -111,7 +111,7 @@ impl<'a> Graphemes<'a> { /// Create new iterator for *legacy grapheme clusters*. #[inline] - pub fn new_legacy(s: &str) -> Graphemes { + pub fn new_legacy(s: &str) -> Graphemes<'_> { let len = s.len(); Graphemes { string: s, diff --git a/unic/segment/src/lib.rs b/unic/segment/src/lib.rs index 3b166d3e..01cd7a39 100644 --- a/unic/segment/src/lib.rs +++ b/unic/segment/src/lib.rs @@ -78,10 +78,9 @@ //! ); //! ``` -extern crate unic_ucd_segment; -#[cfg(test)] -extern crate unic_ucd_common; + + pub use unic_ucd_segment::UNICODE_VERSION; diff --git a/unic/segment/src/word.rs b/unic/segment/src/word.rs index faf81f13..48b33d7b 100644 --- a/unic/segment/src/word.rs +++ b/unic/segment/src/word.rs @@ -48,7 +48,7 @@ impl<'a> DoubleEndedIterator for Words<'a> { impl<'a> Words<'a> { /// Create new iterator for *words*. #[inline] - pub fn new(s: &str, filter: fn(&&str) -> bool) -> Words { + pub fn new(s: &str, filter: fn(&&str) -> bool) -> Words<'_> { Words { inner: WordBounds::new(s).filter(filter), } @@ -74,7 +74,7 @@ pub struct WordBoundIndices<'a> { impl<'a> WordBoundIndices<'a> { /// Create new iterator for *word boundries and their indices*. #[inline] - pub fn new(s: &str) -> WordBoundIndices { + pub fn new(s: &str) -> WordBoundIndices<'_> { WordBoundIndices { start_offset: s.as_ptr() as usize, iter: WordBounds::new(s), @@ -631,7 +631,7 @@ impl<'a> DoubleEndedIterator for WordBounds<'a> { impl<'a> WordBounds<'a> { /// Create new iterator for *word boundries*. #[inline] - pub fn new(s: &str) -> WordBounds { + pub fn new(s: &str) -> WordBounds<'_> { WordBounds { string: s, cat: None, diff --git a/unic/segment/tests/basic_example.rs b/unic/segment/tests/basic_example.rs index e9dd0441..1da3a26d 100644 --- a/unic/segment/tests/basic_example.rs +++ b/unic/segment/tests/basic_example.rs @@ -9,8 +9,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_segment; -extern crate unic_ucd_common; + + use unic_segment::{GraphemeIndices, Graphemes, WordBoundIndices, WordBounds, Words}; use unic_ucd_common::is_alphanumeric; diff --git a/unic/segment/tests/grapheme_cluster_conformance_tests.rs b/unic/segment/tests/grapheme_cluster_conformance_tests.rs index 8f2a2a98..992d30b1 100644 --- a/unic/segment/tests/grapheme_cluster_conformance_tests.rs +++ b/unic/segment/tests/grapheme_cluster_conformance_tests.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_segment; + use unic_segment::Graphemes; diff --git a/unic/segment/tests/quickcheck_tests.rs b/unic/segment/tests/quickcheck_tests.rs index 02ad528a..be075ce5 100644 --- a/unic/segment/tests/quickcheck_tests.rs +++ b/unic/segment/tests/quickcheck_tests.rs @@ -12,7 +12,7 @@ #[macro_use] extern crate quickcheck; -extern crate unic_segment; + use unic_segment::{Graphemes, WordBounds}; diff --git a/unic/segment/tests/words_conformance_tests.rs b/unic/segment/tests/words_conformance_tests.rs index 176327ac..3b24f4f0 100644 --- a/unic/segment/tests/words_conformance_tests.rs +++ b/unic/segment/tests/words_conformance_tests.rs @@ -9,7 +9,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_segment; + use unic_segment::{WordBoundIndices, WordBounds}; diff --git a/unic/src/lib.rs b/unic/src/lib.rs index 808a7bcb..d17116c3 100644 --- a/unic/src/lib.rs +++ b/unic/src/lib.rs @@ -171,13 +171,13 @@ //! } //! ``` -pub extern crate unic_bidi as bidi; -pub extern crate unic_char as char; -pub extern crate unic_emoji as emoji; -pub extern crate unic_idna as idna; -pub extern crate unic_normal as normal; -pub extern crate unic_segment as segment; -pub extern crate unic_ucd as ucd; +pub use unic_bidi as bidi; +pub use unic_char as char; +pub use unic_emoji as emoji; +pub use unic_idna as idna; +pub use unic_normal as normal; +pub use unic_segment as segment; +pub use unic_ucd as ucd; /// The [Unicode version](https://www.unicode.org/versions/) of data pub use crate::ucd::UNICODE_VERSION; diff --git a/unic/tests/basics_test.rs b/unic/tests/basics_test.rs index c076359b..32794db5 100644 --- a/unic/tests/basics_test.rs +++ b/unic/tests/basics_test.rs @@ -11,7 +11,7 @@ #![forbid(unsafe_code)] -extern crate unic; + use unic::bidi::BidiInfo; use unic::normal::StrNormalForm; diff --git a/unic/tests/char_range_integration_tests.rs b/unic/tests/char_range_integration_tests.rs index 7279e2ae..0c6b6bcc 100644 --- a/unic/tests/char_range_integration_tests.rs +++ b/unic/tests/char_range_integration_tests.rs @@ -16,10 +16,10 @@ unsafe_code )] -extern crate unic_char; + #[macro_use] extern crate unic_char_range; -extern crate unic_ucd; + use unic_char::basics::{is_noncharacter, is_private_use, unicode_notation}; use unic_char::range::CharRange; diff --git a/unic/ucd/age/src/lib.rs b/unic/ucd/age/src/lib.rs index 1f3012ab..3abb1455 100644 --- a/unic/ucd/age/src/lib.rs +++ b/unic/ucd/age/src/lib.rs @@ -26,10 +26,10 @@ //! //! * -extern crate unic_char_property; + #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + pub use unic_ucd_version::UnicodeVersion; diff --git a/unic/ucd/age/tests/age_tests.rs b/unic/ucd/age/tests/age_tests.rs index 88bcef09..cad8a7cd 100644 --- a/unic/ucd/age/tests/age_tests.rs +++ b/unic/ucd/age/tests/age_tests.rs @@ -11,7 +11,7 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_age; + use unic_ucd_age::{Age, UnicodeVersion, UNICODE_VERSION}; diff --git a/unic/ucd/age/tests/unicode_version_tests.rs b/unic/ucd/age/tests/unicode_version_tests.rs index 7341763b..67d306c1 100644 --- a/unic/ucd/age/tests/unicode_version_tests.rs +++ b/unic/ucd/age/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_age; -extern crate unic_ucd_version; +use unic_ucd_age; +use unic_ucd_version; #[test] fn test_unicode_version_against_ucd_version() { diff --git a/unic/ucd/bidi/src/lib.rs b/unic/ucd/bidi/src/lib.rs index bf9d1571..52ba0108 100644 --- a/unic/ucd/bidi/src/lib.rs +++ b/unic/ucd/bidi/src/lib.rs @@ -30,7 +30,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/bidi/tests/basic_tests.rs b/unic/ucd/bidi/tests/basic_tests.rs index a5f21a50..f56f6b90 100644 --- a/unic/ucd/bidi/tests/basic_tests.rs +++ b/unic/ucd/bidi/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_bidi; + #[test] fn test_bidi_class_display() { diff --git a/unic/ucd/bidi/tests/unicode_version_tests.rs b/unic/ucd/bidi/tests/unicode_version_tests.rs index 4eadf83e..a77eab7a 100644 --- a/unic/ucd/bidi/tests/unicode_version_tests.rs +++ b/unic/ucd/bidi/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_bidi; -extern crate unic_ucd_version; +use unic_ucd_bidi; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/block/src/lib.rs b/unic/ucd/block/src/lib.rs index 7ec6b4b6..57794ff7 100644 --- a/unic/ucd/block/src/lib.rs +++ b/unic/ucd/block/src/lib.rs @@ -26,8 +26,8 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_char_property; -extern crate unic_ucd_version; + + mod block; pub use crate::block::{Block, BlockIter}; diff --git a/unic/ucd/block/tests/basic_tests.rs b/unic/ucd/block/tests/basic_tests.rs index 9951dfd8..b4d455fb 100644 --- a/unic/ucd/block/tests/basic_tests.rs +++ b/unic/ucd/block/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_block; + use unic_ucd_block::{Block, BlockIter}; #[test] diff --git a/unic/ucd/block/tests/unicode_version_tests.rs b/unic/ucd/block/tests/unicode_version_tests.rs index d8747a6c..c3759539 100644 --- a/unic/ucd/block/tests/unicode_version_tests.rs +++ b/unic/ucd/block/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_block; -extern crate unic_ucd_version; +use unic_ucd_block; +use unic_ucd_version; #[test] fn test_unicode_version_against_ucd_version() { diff --git a/unic/ucd/case/src/lib.rs b/unic/ucd/case/src/lib.rs index f21071b0..d58b9f2e 100644 --- a/unic/ucd/case/src/lib.rs +++ b/unic/ucd/case/src/lib.rs @@ -30,7 +30,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/case/tests/unicode_version_tests.rs b/unic/ucd/case/tests/unicode_version_tests.rs index bb53444b..870a1d32 100644 --- a/unic/ucd/case/tests/unicode_version_tests.rs +++ b/unic/ucd/case/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_case; -extern crate unic_ucd_version; +use unic_ucd_case; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/category/src/lib.rs b/unic/ucd/category/src/lib.rs index 82d3bdf7..8cfceb32 100644 --- a/unic/ucd/category/src/lib.rs +++ b/unic/ucd/category/src/lib.rs @@ -50,7 +50,7 @@ extern crate matches; extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/category/tests/basic_tests.rs b/unic/ucd/category/tests/basic_tests.rs index bf0b4037..b7d65351 100644 --- a/unic/ucd/category/tests/basic_tests.rs +++ b/unic/ucd/category/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_category; + use unic_ucd_category::GeneralCategory as GC; diff --git a/unic/ucd/category/tests/major_category_tests.rs b/unic/ucd/category/tests/major_category_tests.rs index b06bc780..012fb503 100644 --- a/unic/ucd/category/tests/major_category_tests.rs +++ b/unic/ucd/category/tests/major_category_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_char_property; -extern crate unic_ucd_category; + + use unic_char_property::EnumeratedCharProperty; use unic_ucd_category::GeneralCategory; diff --git a/unic/ucd/category/tests/unicode_version_tests.rs b/unic/ucd/category/tests/unicode_version_tests.rs index 5303f0b1..fed6b3eb 100644 --- a/unic/ucd/category/tests/unicode_version_tests.rs +++ b/unic/ucd/category/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_category; -extern crate unic_ucd_version; +use unic_ucd_category; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/common/src/lib.rs b/unic/ucd/common/src/lib.rs index ae8425c4..bdea6a04 100644 --- a/unic/ucd/common/src/lib.rs +++ b/unic/ucd/common/src/lib.rs @@ -29,7 +29,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/common/tests/consistency_tests.rs b/unic/ucd/common/tests/consistency_tests.rs index c7d34bd0..eaa0b688 100644 --- a/unic/ucd/common/tests/consistency_tests.rs +++ b/unic/ucd/common/tests/consistency_tests.rs @@ -11,8 +11,8 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_category; -extern crate unic_ucd_common; + + use unic_ucd_category::GeneralCategory; use unic_ucd_common::{is_alphabetic, is_alphanumeric, is_control, is_numeric, is_white_space}; diff --git a/unic/ucd/common/tests/unicode_version_tests.rs b/unic/ucd/common/tests/unicode_version_tests.rs index ad1c1371..be119824 100644 --- a/unic/ucd/common/tests/unicode_version_tests.rs +++ b/unic/ucd/common/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_common; -extern crate unic_ucd_version; +use unic_ucd_common; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs b/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs index 5ec32838..f1d31306 100644 --- a/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs +++ b/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_char_basics; -extern crate unic_char_range; -extern crate unic_ucd_case; -extern crate unic_ucd_category; + + + + use unic_char_basics::unicode_notation; use unic_char_range::CharRange; diff --git a/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs b/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs index 18378444..09fb443e 100644 --- a/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs +++ b/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_char_basics; -extern crate unic_char_range; -extern crate unic_ucd_case; -extern crate unic_ucd_category; + + + + use unic_char_basics::unicode_notation; use unic_char_range::CharRange; diff --git a/unic/ucd/hangul/src/lib.rs b/unic/ucd/hangul/src/lib.rs index 6ea351ce..64271bbe 100644 --- a/unic/ucd/hangul/src/lib.rs +++ b/unic/ucd/hangul/src/lib.rs @@ -46,7 +46,7 @@ //! assert_eq!(composed, sample_hangul); //! ``` -extern crate unic_ucd_version; + use unic_ucd_version::UnicodeVersion; mod hangul; diff --git a/unic/ucd/hangul/tests/basic_tests.rs b/unic/ucd/hangul/tests/basic_tests.rs index d742ca58..972944f3 100644 --- a/unic/ucd/hangul/tests/basic_tests.rs +++ b/unic/ucd/hangul/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_hangul; + use unic_ucd_hangul::{compose_syllable, decompose_syllable, is_syllable}; #[test] diff --git a/unic/ucd/hangul/tests/unicode_version_tests.rs b/unic/ucd/hangul/tests/unicode_version_tests.rs index 6b6a2da2..a29f1439 100644 --- a/unic/ucd/hangul/tests/unicode_version_tests.rs +++ b/unic/ucd/hangul/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_hangul; -extern crate unic_ucd_version; +use unic_ucd_hangul; +use unic_ucd_version; #[test] fn test_unicode_version_against_ucd_version() { diff --git a/unic/ucd/ident/src/lib.rs b/unic/ucd/ident/src/lib.rs index a945ccba..5f2b23e6 100644 --- a/unic/ucd/ident/src/lib.rs +++ b/unic/ucd/ident/src/lib.rs @@ -37,7 +37,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/ident/tests/lexical_class_tests.rs b/unic/ucd/ident/tests/lexical_class_tests.rs index 264dbc8e..604d887c 100644 --- a/unic/ucd/ident/tests/lexical_class_tests.rs +++ b/unic/ucd/ident/tests/lexical_class_tests.rs @@ -13,12 +13,12 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_category; -extern crate unic_ucd_ident; + + #[macro_use] extern crate matches; -extern crate regex; +use regex; use std::char; use std::collections::BTreeSet; @@ -46,7 +46,7 @@ fn test_id_derivation() { .captures_iter(include_str!( "../../../../external/unicode/ucd/data/PropList.txt" )) - .flat_map(|cap: regex::Captures| { + .flat_map(|cap: regex::Captures<'_>| { let low = char::from_u32(u32::from_str_radix(&cap[1], 16).unwrap()).unwrap(); let high = cap .get(2) @@ -71,7 +71,7 @@ fn test_id_derivation() { .captures_iter(include_str!( "../../../../external/unicode/ucd/data/PropList.txt" )) - .flat_map(|cap: regex::Captures| { + .flat_map(|cap: regex::Captures<'_>| { let low = char::from_u32(u32::from_str_radix(&cap[1], 16).unwrap()).unwrap(); let high = cap .get(2) diff --git a/unic/ucd/ident/tests/unicode_version_tests.rs b/unic/ucd/ident/tests/unicode_version_tests.rs index 9d2e4412..44e389f1 100644 --- a/unic/ucd/ident/tests/unicode_version_tests.rs +++ b/unic/ucd/ident/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_ident; -extern crate unic_ucd_version; +use unic_ucd_ident; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/name/src/lib.rs b/unic/ucd/name/src/lib.rs index c7ecb9db..fb479f95 100644 --- a/unic/ucd/name/src/lib.rs +++ b/unic/ucd/name/src/lib.rs @@ -23,9 +23,9 @@ //! //! Accessor for character Name properties from Unicode Character Database (UCD) -extern crate unic_char_property; -extern crate unic_ucd_hangul; -extern crate unic_ucd_version; + + + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/name/src/name.rs b/unic/ucd/name/src/name.rs index 8768c627..6357dbcc 100644 --- a/unic/ucd/name/src/name.rs +++ b/unic/ucd/name/src/name.rs @@ -54,17 +54,17 @@ impl Name { /// Find the character `Name` property value. pub fn of(ch: char) -> Option { match ch { - '\u{AC00}'...'\u{D7A3}' => Some(Name::NR1(ch)), - '\u{3400}'...'\u{4DB5}' - | '\u{4E00}'...'\u{9FEA}' - | '\u{20000}'...'\u{2A6D6}' - | '\u{2A700}'...'\u{2B734}' - | '\u{2B740}'...'\u{2B81D}' - | '\u{2B820}'...'\u{2CEA1}' - | '\u{2CEB0}'...'\u{2EBE0}' => Some(Name::NR2(PREFIX_CJK_UNIFIED_IDEOGRAPH, ch)), - '\u{17000}'...'\u{187EC}' => Some(Name::NR2(PREFIX_TANGUT_IDEOGRAPH, ch)), - '\u{1B170}'...'\u{1B2FB}' => Some(Name::NR2(PREFIX_NUSHU_CHARACTER, ch)), - '\u{F900}'...'\u{FA6D}' | '\u{FA70}'...'\u{FAD9}' | '\u{2F800}'...'\u{2FA1D}' => { + '\u{AC00}'..='\u{D7A3}' => Some(Name::NR1(ch)), + '\u{3400}'..='\u{4DB5}' + | '\u{4E00}'..='\u{9FEA}' + | '\u{20000}'..='\u{2A6D6}' + | '\u{2A700}'..='\u{2B734}' + | '\u{2B740}'..='\u{2B81D}' + | '\u{2B820}'..='\u{2CEA1}' + | '\u{2CEB0}'..='\u{2EBE0}' => Some(Name::NR2(PREFIX_CJK_UNIFIED_IDEOGRAPH, ch)), + '\u{17000}'..='\u{187EC}' => Some(Name::NR2(PREFIX_TANGUT_IDEOGRAPH, ch)), + '\u{1B170}'..='\u{1B2FB}' => Some(Name::NR2(PREFIX_NUSHU_CHARACTER, ch)), + '\u{F900}'..='\u{FA6D}' | '\u{FA70}'..='\u{FAD9}' | '\u{2F800}'..='\u{2FA1D}' => { Some(Name::NR2(PREFIX_CJK_COMPATIBILITY_IDEOGRAPH, ch)) } _ => data::NAMES.find(ch).map(|pieces| Name::NR3(pieces)), @@ -132,7 +132,7 @@ impl Name { } impl fmt::Display for Name { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { Name::NR1(ch) => { f.write_str(PREFIX_HANGUL_SYLLABLE)?; diff --git a/unic/ucd/name/tests/basic_tests.rs b/unic/ucd/name/tests/basic_tests.rs index 2e9af3a7..fa481655 100644 --- a/unic/ucd/name/tests/basic_tests.rs +++ b/unic/ucd/name/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_name; + use unic_ucd_name::Name; diff --git a/unic/ucd/name/tests/unicode_version_tests.rs b/unic/ucd/name/tests/unicode_version_tests.rs index 8061cbdd..7e2886cd 100644 --- a/unic/ucd/name/tests/unicode_version_tests.rs +++ b/unic/ucd/name/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_name; -extern crate unic_ucd_version; +use unic_ucd_name; +use unic_ucd_version; #[test] fn test_unicode_version_against_ucd_version() { diff --git a/unic/ucd/normal/src/canonical_combining_class.rs b/unic/ucd/normal/src/canonical_combining_class.rs index d1b54592..223ed613 100644 --- a/unic/ucd/normal/src/canonical_combining_class.rs +++ b/unic/ucd/normal/src/canonical_combining_class.rs @@ -118,7 +118,7 @@ impl CanonicalCombiningClass { } impl fmt::Display for CanonicalCombiningClass { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.number()) } } diff --git a/unic/ucd/normal/src/gen_cat.rs b/unic/ucd/normal/src/gen_cat.rs index 261d468c..3928e4d0 100644 --- a/unic/ucd/normal/src/gen_cat.rs +++ b/unic/ucd/normal/src/gen_cat.rs @@ -24,7 +24,7 @@ mod mark { #[cfg(feature = "unic-ucd-category")] mod mark { - extern crate unic_ucd_category; + use unic_ucd_category; use self::unic_ucd_category::GeneralCategory; diff --git a/unic/ucd/normal/src/lib.rs b/unic/ucd/normal/src/lib.rs index 24dedf03..ed91aace 100644 --- a/unic/ucd/normal/src/lib.rs +++ b/unic/ucd/normal/src/lib.rs @@ -38,8 +38,8 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_hangul; -extern crate unic_ucd_version; + + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/normal/tests/basic_tests.rs b/unic/ucd/normal/tests/basic_tests.rs index 1851ace5..25d3c943 100644 --- a/unic/ucd/normal/tests/basic_tests.rs +++ b/unic/ucd/normal/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_normal; +use unic_ucd_normal; use self::unic_ucd_normal::{CanonicalCombiningClass as CCC, DecompositionType as DT}; diff --git a/unic/ucd/normal/tests/conformance_tests.rs b/unic/ucd/normal/tests/conformance_tests.rs index 2fbdaf08..d7d92c31 100644 --- a/unic/ucd/normal/tests/conformance_tests.rs +++ b/unic/ucd/normal/tests/conformance_tests.rs @@ -11,7 +11,7 @@ #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_normal; + use std::collections::HashSet as Set; use std::{char, u32}; diff --git a/unic/ucd/normal/tests/excluded_composition_tests.rs b/unic/ucd/normal/tests/excluded_composition_tests.rs index ce32ea03..4c07e45b 100644 --- a/unic/ucd/normal/tests/excluded_composition_tests.rs +++ b/unic/ucd/normal/tests/excluded_composition_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_normal; + use unic_ucd_normal::{canonical_composition, canonical_decomposition}; diff --git a/unic/ucd/normal/tests/unicode_version_tests.rs b/unic/ucd/normal/tests/unicode_version_tests.rs index 0a9e57c5..519b544a 100644 --- a/unic/ucd/normal/tests/unicode_version_tests.rs +++ b/unic/ucd/normal/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_normal; -extern crate unic_ucd_version; +use unic_ucd_normal; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/segment/src/lib.rs b/unic/ucd/segment/src/lib.rs index 1693b76e..d81b8942 100644 --- a/unic/ucd/segment/src/lib.rs +++ b/unic/ucd/segment/src/lib.rs @@ -29,7 +29,7 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd_version; + mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/segment/tests/basic_tests.rs b/unic/ucd/segment/tests/basic_tests.rs index 6f6f2973..a6d170e9 100644 --- a/unic/ucd/segment/tests/basic_tests.rs +++ b/unic/ucd/segment/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_segment; + use unic_ucd_segment::grapheme_cluster_break::GraphemeClusterBreak as GCB; use unic_ucd_segment::sentence_break::SentenceBreak as SB; diff --git a/unic/ucd/segment/tests/conformance_tests.rs b/unic/ucd/segment/tests/conformance_tests.rs index 7abfe423..5b6af490 100644 --- a/unic/ucd/segment/tests/conformance_tests.rs +++ b/unic/ucd/segment/tests/conformance_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_char_property; -extern crate unic_ucd_segment; + + use unic_char_property::tables::CharDataTable; diff --git a/unic/ucd/segment/tests/unicode_version_tests.rs b/unic/ucd/segment/tests/unicode_version_tests.rs index a322ff7a..a5e2df2a 100644 --- a/unic/ucd/segment/tests/unicode_version_tests.rs +++ b/unic/ucd/segment/tests/unicode_version_tests.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_segment; -extern crate unic_ucd_version; +use unic_ucd_segment; +use unic_ucd_version; #[test] fn test_version_against_ucd_version() { diff --git a/unic/ucd/src/lib.rs b/unic/ucd/src/lib.rs index 8cbde963..892cd91e 100644 --- a/unic/ucd/src/lib.rs +++ b/unic/ucd/src/lib.rs @@ -24,19 +24,19 @@ //! This UNIC component provides access to character properties as defined in the [Unicode //! Standard Annex #44 - Unicode Character Database](http://unicode.org/reports/tr44/). -pub extern crate unic_ucd_common as common; -pub extern crate unic_ucd_version as version; - -pub extern crate unic_ucd_age as age; -pub extern crate unic_ucd_bidi as bidi; -pub extern crate unic_ucd_block as block; -pub extern crate unic_ucd_case as case; -pub extern crate unic_ucd_category as category; -pub extern crate unic_ucd_hangul as hangul; -pub extern crate unic_ucd_ident as ident; -pub extern crate unic_ucd_name as name; -pub extern crate unic_ucd_normal as normal; -pub extern crate unic_ucd_segment as segment; +pub use unic_ucd_common as common; +pub use unic_ucd_version as version; + +pub use unic_ucd_age as age; +pub use unic_ucd_bidi as bidi; +pub use unic_ucd_block as block; +pub use unic_ucd_case as case; +pub use unic_ucd_category as category; +pub use unic_ucd_hangul as hangul; +pub use unic_ucd_ident as ident; +pub use unic_ucd_name as name; +pub use unic_ucd_normal as normal; +pub use unic_ucd_segment as segment; pub use crate::version::UnicodeVersion; diff --git a/unic/ucd/tests/bidi_class_consistency_tests.rs b/unic/ucd/tests/bidi_class_consistency_tests.rs index def4e9af..5cf59bfb 100644 --- a/unic/ucd/tests/bidi_class_consistency_tests.rs +++ b/unic/ucd/tests/bidi_class_consistency_tests.rs @@ -19,7 +19,7 @@ extern crate matches; #[macro_use] extern crate unic_char_range; -extern crate unic_ucd; + use unic_ucd::bidi::BidiClass as BC; use unic_ucd::category::GeneralCategory as GC; diff --git a/unic/ucd/version/src/lib.rs b/unic/ucd/version/src/lib.rs index 783be37b..77dac184 100644 --- a/unic/ucd/version/src/lib.rs +++ b/unic/ucd/version/src/lib.rs @@ -23,7 +23,7 @@ //! //! Core create indicating the version of Unicode Character Database. -extern crate unic_common; + pub use unic_common::version::UnicodeVersion; diff --git a/unic/ucd/version/tests/basic_tests.rs b/unic/ucd/version/tests/basic_tests.rs index bf4a6604..09767f55 100644 --- a/unic/ucd/version/tests/basic_tests.rs +++ b/unic/ucd/version/tests/basic_tests.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate unic_ucd_version; + use unic_ucd_version::UnicodeVersion; From 06277f9bf247a000c8dc7b13730e838cabddd4ad Mon Sep 17 00:00:00 2001 From: Behnam Esfahbod Date: Sun, 6 Jan 2019 08:36:52 -0800 Subject: [PATCH 6/6] all: manual edition-idioms fixes --- apps/cli/src/bin/unic-inspector.rs | 3 --- apps/cli/src/lib.rs | 1 - apps/cli/tests/quickcheck.rs | 2 -- apps/cli/tests/test_unic-echo.rs | 2 -- gen/src/main.rs | 3 --- gen/src/writer/utils/tables/mod.rs | 2 +- unic/bidi/benches/bidi_basic_benches.rs | 1 - unic/bidi/benches/bidi_udhr_benches.rs | 1 - unic/bidi/src/lib.rs | 4 ---- unic/bidi/tests/conformance_tests.rs | 3 --- unic/char/basics/tests/basic_tests.rs | 2 -- unic/char/basics/tests/coverage_tests.rs | 3 --- unic/char/property/tests/tables_tests.rs | 2 -- unic/char/range/benches/benchmarks.rs | 1 - unic/char/range/src/lib.rs | 2 -- unic/char/range/tests/iter_tests.rs | 2 -- unic/emoji/char/src/lib.rs | 1 - unic/examples/bidi_example.rs | 2 -- unic/examples/normal_example.rs | 2 -- unic/examples/ucd_bidi_traits_example.rs | 2 -- unic/idna/mapping/src/lib.rs | 2 -- unic/idna/punycode/tests/punycode_tests.rs | 3 --- unic/idna/src/lib.rs | 4 ---- unic/normal/src/lib.rs | 2 -- unic/normal/tests/conformance_tests.rs | 2 -- unic/segment/src/lib.rs | 4 ---- unic/segment/tests/basic_example.rs | 3 --- unic/segment/tests/grapheme_cluster_conformance_tests.rs | 2 -- unic/segment/tests/quickcheck_tests.rs | 2 -- unic/segment/tests/words_conformance_tests.rs | 2 -- unic/tests/basics_test.rs | 2 -- unic/tests/char_range_integration_tests.rs | 2 -- unic/ucd/age/src/lib.rs | 2 -- unic/ucd/age/tests/age_tests.rs | 2 -- unic/ucd/bidi/src/lib.rs | 2 -- unic/ucd/bidi/tests/basic_tests.rs | 2 -- unic/ucd/block/src/lib.rs | 2 -- unic/ucd/block/tests/basic_tests.rs | 1 - unic/ucd/case/src/lib.rs | 2 -- unic/ucd/category/src/lib.rs | 1 - unic/ucd/category/tests/basic_tests.rs | 2 -- unic/ucd/category/tests/major_category_tests.rs | 3 --- unic/ucd/common/src/lib.rs | 2 -- unic/ucd/common/tests/consistency_tests.rs | 3 --- .../examples/lowercase_chars_with_identity_touppercase.rs | 5 ----- .../examples/uppercase_chars_with_identity_tolowercase.rs | 5 ----- unic/ucd/hangul/src/lib.rs | 1 - unic/ucd/hangul/tests/basic_tests.rs | 1 - unic/ucd/ident/src/lib.rs | 1 - unic/ucd/ident/tests/lexical_class_tests.rs | 2 -- unic/ucd/name/src/lib.rs | 4 ---- unic/ucd/name/tests/basic_tests.rs | 2 -- unic/ucd/normal/src/lib.rs | 2 -- unic/ucd/normal/tests/conformance_tests.rs | 2 -- unic/ucd/normal/tests/excluded_composition_tests.rs | 2 -- unic/ucd/segment/src/lib.rs | 2 -- unic/ucd/segment/tests/basic_tests.rs | 2 -- unic/ucd/segment/tests/conformance_tests.rs | 3 --- unic/ucd/tests/bidi_class_consistency_tests.rs | 2 -- unic/ucd/version/src/lib.rs | 2 -- unic/ucd/version/tests/basic_tests.rs | 2 -- 61 files changed, 1 insertion(+), 134 deletions(-) diff --git a/apps/cli/src/bin/unic-inspector.rs b/apps/cli/src/bin/unic-inspector.rs index 2df34f19..c41a80cc 100644 --- a/apps/cli/src/bin/unic-inspector.rs +++ b/apps/cli/src/bin/unic-inspector.rs @@ -14,9 +14,6 @@ extern crate clap; #[macro_use] extern crate prettytable; - - - use clap::Arg; use prettytable::format::TableFormat; use prettytable::Table; diff --git a/apps/cli/src/lib.rs b/apps/cli/src/lib.rs index c192a318..293937ea 100644 --- a/apps/cli/src/lib.rs +++ b/apps/cli/src/lib.rs @@ -11,7 +11,6 @@ #[macro_use] extern crate lazy_static; - pub mod parsers; pub mod writers; diff --git a/apps/cli/tests/quickcheck.rs b/apps/cli/tests/quickcheck.rs index d7ef26d3..0073d753 100644 --- a/apps/cli/tests/quickcheck.rs +++ b/apps/cli/tests/quickcheck.rs @@ -11,8 +11,6 @@ #[macro_use] extern crate quickcheck; - - use unic_cli::parsers; use unic_cli::writers; diff --git a/apps/cli/tests/test_unic-echo.rs b/apps/cli/tests/test_unic-echo.rs index 1f20019f..38568012 100644 --- a/apps/cli/tests/test_unic-echo.rs +++ b/apps/cli/tests/test_unic-echo.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use assert_cli::Assert; // At the moment, there's no way to test stdout value for an exact string, therefore a mix of diff --git a/gen/src/main.rs b/gen/src/main.rs index d2f5ed96..b2a612e2 100644 --- a/gen/src/main.rs +++ b/gen/src/main.rs @@ -20,9 +20,6 @@ extern crate lazy_static; #[macro_use] extern crate matches; - - - mod source; mod writer; diff --git a/gen/src/writer/utils/tables/mod.rs b/gen/src/writer/utils/tables/mod.rs index a753013f..00ac6ded 100644 --- a/gen/src/writer/utils/tables/mod.rs +++ b/gen/src/writer/utils/tables/mod.rs @@ -19,7 +19,7 @@ pub use self::range::ToRangeCharTable; pub use self::set::ToRangeCharSet; #[derive(Debug)] -struct DisplayWrapper<'a, T: 'a, F: 'a>(&'a T, &'a F) +struct DisplayWrapper<'a, T, F>(&'a T, &'a F) where F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result; diff --git a/unic/bidi/benches/bidi_basic_benches.rs b/unic/bidi/benches/bidi_basic_benches.rs index e43dbd7b..66edfee7 100644 --- a/unic/bidi/benches/bidi_basic_benches.rs +++ b/unic/bidi/benches/bidi_basic_benches.rs @@ -14,7 +14,6 @@ extern crate test; - use test::Bencher; use unic_bidi::BidiInfo; diff --git a/unic/bidi/benches/bidi_udhr_benches.rs b/unic/bidi/benches/bidi_udhr_benches.rs index e7d14dc4..8e342f31 100644 --- a/unic/bidi/benches/bidi_udhr_benches.rs +++ b/unic/bidi/benches/bidi_udhr_benches.rs @@ -14,7 +14,6 @@ extern crate test; - use test::Bencher; use unic_bidi::BidiInfo; diff --git a/unic/bidi/src/lib.rs b/unic/bidi/src/lib.rs index 93a0231a..e3253f9f 100644 --- a/unic/bidi/src/lib.rs +++ b/unic/bidi/src/lib.rs @@ -71,8 +71,6 @@ //! //! [tr9]: https://www.unicode.org/reports/tr9/ - - #[macro_use] extern crate matches; @@ -80,8 +78,6 @@ extern crate matches; #[macro_use] extern crate serde; - - pub use unic_ucd_bidi::UNICODE_VERSION; pub use unic_ucd_bidi::{bidi_class, BidiClass, BidiClassCategory}; diff --git a/unic/bidi/tests/conformance_tests.rs b/unic/bidi/tests/conformance_tests.rs index bf67fbec..efe98997 100644 --- a/unic/bidi/tests/conformance_tests.rs +++ b/unic/bidi/tests/conformance_tests.rs @@ -11,9 +11,6 @@ #![cfg(test)] - - - use unic_bidi::{format_chars, level, BidiClass, BidiInfo, Level}; const BASIC_TEST_DATA: &str = include_str!("../../../external/unicode/ucd/data/BidiTest.txt"); diff --git a/unic/char/basics/tests/basic_tests.rs b/unic/char/basics/tests/basic_tests.rs index 6612ae6a..47076618 100644 --- a/unic/char/basics/tests/basic_tests.rs +++ b/unic/char/basics/tests/basic_tests.rs @@ -16,8 +16,6 @@ unsafe_code )] - - use unic_char_basics::unicode_notation; /// Test Unicode Notation formatting for samples from Unicode Scalar Value range. diff --git a/unic/char/basics/tests/coverage_tests.rs b/unic/char/basics/tests/coverage_tests.rs index 3c3d80b7..c70e4489 100644 --- a/unic/char/basics/tests/coverage_tests.rs +++ b/unic/char/basics/tests/coverage_tests.rs @@ -16,9 +16,6 @@ unsafe_code )] - - - use unic_char_basics::{is_noncharacter, is_private_use}; use unic_char_range::CharRange; diff --git a/unic/char/property/tests/tables_tests.rs b/unic/char/property/tests/tables_tests.rs index e9e73267..d2064958 100644 --- a/unic/char/property/tests/tables_tests.rs +++ b/unic/char/property/tests/tables_tests.rs @@ -11,8 +11,6 @@ #[macro_use] extern crate unic_char_range; - - use unic_char_property::tables::CharDataTable; #[test] diff --git a/unic/char/range/benches/benchmarks.rs b/unic/char/range/benches/benchmarks.rs index fb606f8e..a05ac271 100644 --- a/unic/char/range/benches/benchmarks.rs +++ b/unic/char/range/benches/benchmarks.rs @@ -12,7 +12,6 @@ extern crate test; - use std::char; use unic_char_range::CharRange; diff --git a/unic/char/range/src/lib.rs b/unic/char/range/src/lib.rs index f098230c..1f6e82c4 100644 --- a/unic/char/range/src/lib.rs +++ b/unic/char/range/src/lib.rs @@ -52,8 +52,6 @@ //! [`TrustedLen`]: https://doc.rust-lang.org/std/iter/trait.TrustedLen.html //! - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/char/range/tests/iter_tests.rs b/unic/char/range/tests/iter_tests.rs index 5087deca..9678009a 100644 --- a/unic/char/range/tests/iter_tests.rs +++ b/unic/char/range/tests/iter_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use std::{char, u32, vec}; use unic_char_range::CharRange; diff --git a/unic/emoji/char/src/lib.rs b/unic/emoji/char/src/lib.rs index d2dbe5e0..38be9716 100644 --- a/unic/emoji/char/src/lib.rs +++ b/unic/emoji/char/src/lib.rs @@ -25,7 +25,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/examples/bidi_example.rs b/unic/examples/bidi_example.rs index c9ddc62f..e7d08108 100644 --- a/unic/examples/bidi_example.rs +++ b/unic/examples/bidi_example.rs @@ -11,8 +11,6 @@ #![forbid(unsafe_code)] - - use unic::bidi::BidiInfo; #[cfg_attr(rustfmt, rustfmt_skip)] diff --git a/unic/examples/normal_example.rs b/unic/examples/normal_example.rs index 378957be..1eeabc61 100644 --- a/unic/examples/normal_example.rs +++ b/unic/examples/normal_example.rs @@ -11,8 +11,6 @@ #![forbid(unsafe_code)] - - use unic::normal::StrNormalForm; use unic::ucd::normal::compose; diff --git a/unic/examples/ucd_bidi_traits_example.rs b/unic/examples/ucd_bidi_traits_example.rs index 981829ea..b11b33a0 100644 --- a/unic/examples/ucd_bidi_traits_example.rs +++ b/unic/examples/ucd_bidi_traits_example.rs @@ -11,8 +11,6 @@ #![forbid(unsafe_code)] - - use unic::ucd::bidi::{BidiClass, BidiClassCategory, CharBidiClass, StrBidiClass}; #[cfg_attr(rustfmt, rustfmt_skip)] diff --git a/unic/idna/mapping/src/lib.rs b/unic/idna/mapping/src/lib.rs index 169c628f..47d1771b 100644 --- a/unic/idna/mapping/src/lib.rs +++ b/unic/idna/mapping/src/lib.rs @@ -23,11 +23,9 @@ //! //! * - #[macro_use] extern crate unic_char_range; - mod mapping; use unic_ucd_version::UnicodeVersion; diff --git a/unic/idna/punycode/tests/punycode_tests.rs b/unic/idna/punycode/tests/punycode_tests.rs index dc46122e..7db0a707 100644 --- a/unic/idna/punycode/tests/punycode_tests.rs +++ b/unic/idna/punycode/tests/punycode_tests.rs @@ -9,9 +9,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - use rustc_serialize::json::{self, Json}; use unic_idna_punycode::{decode, encode_str}; diff --git a/unic/idna/src/lib.rs b/unic/idna/src/lib.rs index 4fd8b1bf..2f5bffff 100644 --- a/unic/idna/src/lib.rs +++ b/unic/idna/src/lib.rs @@ -47,10 +47,6 @@ #[macro_use] extern crate matches; - - - - use unic_idna_mapping as mapping; use unic_idna_punycode as punycode; diff --git a/unic/normal/src/lib.rs b/unic/normal/src/lib.rs index 02398261..d10f3dc1 100644 --- a/unic/normal/src/lib.rs +++ b/unic/normal/src/lib.rs @@ -36,8 +36,6 @@ //! } //! ``` - - mod decompose; mod recompose; diff --git a/unic/normal/tests/conformance_tests.rs b/unic/normal/tests/conformance_tests.rs index 6ba5cd07..7cb88c46 100644 --- a/unic/normal/tests/conformance_tests.rs +++ b/unic/normal/tests/conformance_tests.rs @@ -11,8 +11,6 @@ #![cfg(test)] - - use unic_normal::StrNormalForm; type TestDatum = ( diff --git a/unic/segment/src/lib.rs b/unic/segment/src/lib.rs index 01cd7a39..cd255913 100644 --- a/unic/segment/src/lib.rs +++ b/unic/segment/src/lib.rs @@ -78,10 +78,6 @@ //! ); //! ``` - - - - pub use unic_ucd_segment::UNICODE_VERSION; mod pkg_info; diff --git a/unic/segment/tests/basic_example.rs b/unic/segment/tests/basic_example.rs index 1da3a26d..08f737a9 100644 --- a/unic/segment/tests/basic_example.rs +++ b/unic/segment/tests/basic_example.rs @@ -9,9 +9,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - use unic_segment::{GraphemeIndices, Graphemes, WordBoundIndices, WordBounds, Words}; use unic_ucd_common::is_alphanumeric; diff --git a/unic/segment/tests/grapheme_cluster_conformance_tests.rs b/unic/segment/tests/grapheme_cluster_conformance_tests.rs index 992d30b1..daf6d580 100644 --- a/unic/segment/tests/grapheme_cluster_conformance_tests.rs +++ b/unic/segment/tests/grapheme_cluster_conformance_tests.rs @@ -9,8 +9,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_segment::Graphemes; type TestData = &'static [( diff --git a/unic/segment/tests/quickcheck_tests.rs b/unic/segment/tests/quickcheck_tests.rs index be075ce5..7fa1c1f7 100644 --- a/unic/segment/tests/quickcheck_tests.rs +++ b/unic/segment/tests/quickcheck_tests.rs @@ -12,8 +12,6 @@ #[macro_use] extern crate quickcheck; - - use unic_segment::{Graphemes, WordBounds}; // QuickCheck Graphemes diff --git a/unic/segment/tests/words_conformance_tests.rs b/unic/segment/tests/words_conformance_tests.rs index 3b24f4f0..92d94a7a 100644 --- a/unic/segment/tests/words_conformance_tests.rs +++ b/unic/segment/tests/words_conformance_tests.rs @@ -9,8 +9,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_segment::{WordBoundIndices, WordBounds}; type TestData = &'static [(&'static str, &'static [&'static str])]; diff --git a/unic/tests/basics_test.rs b/unic/tests/basics_test.rs index 32794db5..db560a4c 100644 --- a/unic/tests/basics_test.rs +++ b/unic/tests/basics_test.rs @@ -11,8 +11,6 @@ #![forbid(unsafe_code)] - - use unic::bidi::BidiInfo; use unic::normal::StrNormalForm; use unic::segment::{GraphemeIndices, Graphemes, WordBoundIndices, WordBounds, Words}; diff --git a/unic/tests/char_range_integration_tests.rs b/unic/tests/char_range_integration_tests.rs index 0c6b6bcc..b6a18e90 100644 --- a/unic/tests/char_range_integration_tests.rs +++ b/unic/tests/char_range_integration_tests.rs @@ -16,11 +16,9 @@ unsafe_code )] - #[macro_use] extern crate unic_char_range; - use unic_char::basics::{is_noncharacter, is_private_use, unicode_notation}; use unic_char::range::CharRange; use unic_ucd::age::Age; diff --git a/unic/ucd/age/src/lib.rs b/unic/ucd/age/src/lib.rs index 3abb1455..46384458 100644 --- a/unic/ucd/age/src/lib.rs +++ b/unic/ucd/age/src/lib.rs @@ -26,11 +26,9 @@ //! //! * - #[macro_use] extern crate unic_char_range; - pub use unic_ucd_version::UnicodeVersion; mod pkg_info; diff --git a/unic/ucd/age/tests/age_tests.rs b/unic/ucd/age/tests/age_tests.rs index cad8a7cd..8ed23a0b 100644 --- a/unic/ucd/age/tests/age_tests.rs +++ b/unic/ucd/age/tests/age_tests.rs @@ -11,8 +11,6 @@ #[macro_use] extern crate unic_char_range; - - use unic_ucd_age::{Age, UnicodeVersion, UNICODE_VERSION}; /// Character *assignement* values always have Unicode Micro (Update) Version value of zero (`0`). diff --git a/unic/ucd/bidi/src/lib.rs b/unic/ucd/bidi/src/lib.rs index 52ba0108..bb163bac 100644 --- a/unic/ucd/bidi/src/lib.rs +++ b/unic/ucd/bidi/src/lib.rs @@ -30,8 +30,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/bidi/tests/basic_tests.rs b/unic/ucd/bidi/tests/basic_tests.rs index f56f6b90..2ff0fabf 100644 --- a/unic/ucd/bidi/tests/basic_tests.rs +++ b/unic/ucd/bidi/tests/basic_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - #[test] fn test_bidi_class_display() { use unic_ucd_bidi::bidi_class::abbr_names::*; diff --git a/unic/ucd/block/src/lib.rs b/unic/ucd/block/src/lib.rs index 57794ff7..1b286567 100644 --- a/unic/ucd/block/src/lib.rs +++ b/unic/ucd/block/src/lib.rs @@ -27,8 +27,6 @@ #[macro_use] extern crate unic_char_range; - - mod block; pub use crate::block::{Block, BlockIter}; diff --git a/unic/ucd/block/tests/basic_tests.rs b/unic/ucd/block/tests/basic_tests.rs index b4d455fb..079da2c4 100644 --- a/unic/ucd/block/tests/basic_tests.rs +++ b/unic/ucd/block/tests/basic_tests.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - use unic_ucd_block::{Block, BlockIter}; #[test] diff --git a/unic/ucd/case/src/lib.rs b/unic/ucd/case/src/lib.rs index d58b9f2e..65ba633e 100644 --- a/unic/ucd/case/src/lib.rs +++ b/unic/ucd/case/src/lib.rs @@ -30,8 +30,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/category/src/lib.rs b/unic/ucd/category/src/lib.rs index 8cfceb32..b6974111 100644 --- a/unic/ucd/category/src/lib.rs +++ b/unic/ucd/category/src/lib.rs @@ -51,7 +51,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/category/tests/basic_tests.rs b/unic/ucd/category/tests/basic_tests.rs index b7d65351..3aef7729 100644 --- a/unic/ucd/category/tests/basic_tests.rs +++ b/unic/ucd/category/tests/basic_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_ucd_category::GeneralCategory as GC; #[test] diff --git a/unic/ucd/category/tests/major_category_tests.rs b/unic/ucd/category/tests/major_category_tests.rs index 012fb503..758dd5e4 100644 --- a/unic/ucd/category/tests/major_category_tests.rs +++ b/unic/ucd/category/tests/major_category_tests.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - use unic_char_property::EnumeratedCharProperty; use unic_ucd_category::GeneralCategory; diff --git a/unic/ucd/common/src/lib.rs b/unic/ucd/common/src/lib.rs index bdea6a04..144b4e95 100644 --- a/unic/ucd/common/src/lib.rs +++ b/unic/ucd/common/src/lib.rs @@ -29,8 +29,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/common/tests/consistency_tests.rs b/unic/ucd/common/tests/consistency_tests.rs index eaa0b688..79634f98 100644 --- a/unic/ucd/common/tests/consistency_tests.rs +++ b/unic/ucd/common/tests/consistency_tests.rs @@ -11,9 +11,6 @@ #[macro_use] extern crate unic_char_range; - - - use unic_ucd_category::GeneralCategory; use unic_ucd_common::{is_alphabetic, is_alphanumeric, is_control, is_numeric, is_white_space}; diff --git a/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs b/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs index f1d31306..8b9c3795 100644 --- a/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs +++ b/unic/ucd/examples/lowercase_chars_with_identity_touppercase.rs @@ -8,11 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - - - use unic_char_basics::unicode_notation; use unic_char_range::CharRange; use unic_ucd_category::GeneralCategory; diff --git a/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs b/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs index 09fb443e..93bca519 100644 --- a/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs +++ b/unic/ucd/examples/uppercase_chars_with_identity_tolowercase.rs @@ -8,11 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - - - use unic_char_basics::unicode_notation; use unic_char_range::CharRange; use unic_ucd_category::GeneralCategory; diff --git a/unic/ucd/hangul/src/lib.rs b/unic/ucd/hangul/src/lib.rs index 64271bbe..7a689ae9 100644 --- a/unic/ucd/hangul/src/lib.rs +++ b/unic/ucd/hangul/src/lib.rs @@ -46,7 +46,6 @@ //! assert_eq!(composed, sample_hangul); //! ``` - use unic_ucd_version::UnicodeVersion; mod hangul; diff --git a/unic/ucd/hangul/tests/basic_tests.rs b/unic/ucd/hangul/tests/basic_tests.rs index 972944f3..c3d26b31 100644 --- a/unic/ucd/hangul/tests/basic_tests.rs +++ b/unic/ucd/hangul/tests/basic_tests.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - use unic_ucd_hangul::{compose_syllable, decompose_syllable, is_syllable}; #[test] diff --git a/unic/ucd/ident/src/lib.rs b/unic/ucd/ident/src/lib.rs index 5f2b23e6..d8f11481 100644 --- a/unic/ucd/ident/src/lib.rs +++ b/unic/ucd/ident/src/lib.rs @@ -38,7 +38,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/ident/tests/lexical_class_tests.rs b/unic/ucd/ident/tests/lexical_class_tests.rs index 604d887c..7707b688 100644 --- a/unic/ucd/ident/tests/lexical_class_tests.rs +++ b/unic/ucd/ident/tests/lexical_class_tests.rs @@ -14,8 +14,6 @@ #[macro_use] extern crate unic_char_range; - - #[macro_use] extern crate matches; use regex; diff --git a/unic/ucd/name/src/lib.rs b/unic/ucd/name/src/lib.rs index fb479f95..c36d31a6 100644 --- a/unic/ucd/name/src/lib.rs +++ b/unic/ucd/name/src/lib.rs @@ -23,10 +23,6 @@ //! //! Accessor for character Name properties from Unicode Character Database (UCD) - - - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/name/tests/basic_tests.rs b/unic/ucd/name/tests/basic_tests.rs index fa481655..94a2e99a 100644 --- a/unic/ucd/name/tests/basic_tests.rs +++ b/unic/ucd/name/tests/basic_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_ucd_name::Name; #[test] diff --git a/unic/ucd/normal/src/lib.rs b/unic/ucd/normal/src/lib.rs index ed91aace..961c2d13 100644 --- a/unic/ucd/normal/src/lib.rs +++ b/unic/ucd/normal/src/lib.rs @@ -39,8 +39,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/normal/tests/conformance_tests.rs b/unic/ucd/normal/tests/conformance_tests.rs index d7d92c31..fe13922d 100644 --- a/unic/ucd/normal/tests/conformance_tests.rs +++ b/unic/ucd/normal/tests/conformance_tests.rs @@ -11,8 +11,6 @@ #[macro_use] extern crate unic_char_range; - - use std::collections::HashSet as Set; use std::{char, u32}; use unic_ucd_normal::DecompositionType as DT; diff --git a/unic/ucd/normal/tests/excluded_composition_tests.rs b/unic/ucd/normal/tests/excluded_composition_tests.rs index 4c07e45b..b6f4b5c9 100644 --- a/unic/ucd/normal/tests/excluded_composition_tests.rs +++ b/unic/ucd/normal/tests/excluded_composition_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_ucd_normal::{canonical_composition, canonical_decomposition}; // Consider: could be conformance pulling from UCD Composition Exclusions diff --git a/unic/ucd/segment/src/lib.rs b/unic/ucd/segment/src/lib.rs index d81b8942..3165bf67 100644 --- a/unic/ucd/segment/src/lib.rs +++ b/unic/ucd/segment/src/lib.rs @@ -29,8 +29,6 @@ extern crate unic_char_property; #[macro_use] extern crate unic_char_range; - - mod pkg_info; pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION}; diff --git a/unic/ucd/segment/tests/basic_tests.rs b/unic/ucd/segment/tests/basic_tests.rs index a6d170e9..280654c6 100644 --- a/unic/ucd/segment/tests/basic_tests.rs +++ b/unic/ucd/segment/tests/basic_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_ucd_segment::grapheme_cluster_break::GraphemeClusterBreak as GCB; use unic_ucd_segment::sentence_break::SentenceBreak as SB; use unic_ucd_segment::word_break::WordBreak as WB; diff --git a/unic/ucd/segment/tests/conformance_tests.rs b/unic/ucd/segment/tests/conformance_tests.rs index 5b6af490..b90a7aa1 100644 --- a/unic/ucd/segment/tests/conformance_tests.rs +++ b/unic/ucd/segment/tests/conformance_tests.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - - use unic_char_property::tables::CharDataTable; use unic_ucd_segment::grapheme_cluster_break::{self, GraphemeClusterBreak}; diff --git a/unic/ucd/tests/bidi_class_consistency_tests.rs b/unic/ucd/tests/bidi_class_consistency_tests.rs index 5cf59bfb..90ae367a 100644 --- a/unic/ucd/tests/bidi_class_consistency_tests.rs +++ b/unic/ucd/tests/bidi_class_consistency_tests.rs @@ -19,8 +19,6 @@ extern crate matches; #[macro_use] extern crate unic_char_range; - - use unic_ucd::bidi::BidiClass as BC; use unic_ucd::category::GeneralCategory as GC; diff --git a/unic/ucd/version/src/lib.rs b/unic/ucd/version/src/lib.rs index 77dac184..3877f04d 100644 --- a/unic/ucd/version/src/lib.rs +++ b/unic/ucd/version/src/lib.rs @@ -23,8 +23,6 @@ //! //! Core create indicating the version of Unicode Character Database. - - pub use unic_common::version::UnicodeVersion; mod pkg_info; diff --git a/unic/ucd/version/tests/basic_tests.rs b/unic/ucd/version/tests/basic_tests.rs index 09767f55..e385bcf9 100644 --- a/unic/ucd/version/tests/basic_tests.rs +++ b/unic/ucd/version/tests/basic_tests.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. - - use unic_ucd_version::UnicodeVersion; #[test]