Skip to content

Commit 06277f9

Browse files
committed
all: manual edition-idioms fixes
1 parent 5ea8fdc commit 06277f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1
-134
lines changed

apps/cli/src/bin/unic-inspector.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ extern crate clap;
1414
#[macro_use]
1515
extern crate prettytable;
1616

17-
18-
19-
2017
use clap::Arg;
2118
use prettytable::format::TableFormat;
2219
use prettytable::Table;

apps/cli/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#[macro_use]
1212
extern crate lazy_static;
1313

14-
1514
pub mod parsers;
1615
pub mod writers;
1716

apps/cli/tests/quickcheck.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#[macro_use]
1212
extern crate quickcheck;
1313

14-
15-
1614
use unic_cli::parsers;
1715
use unic_cli::writers;
1816

apps/cli/tests/test_unic-echo.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
1311
use assert_cli::Assert;
1412

1513
// At the moment, there's no way to test stdout value for an exact string, therefore a mix of

gen/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ extern crate lazy_static;
2020
#[macro_use]
2121
extern crate matches;
2222

23-
24-
25-
2623
mod source;
2724
mod writer;
2825

gen/src/writer/utils/tables/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub use self::range::ToRangeCharTable;
1919
pub use self::set::ToRangeCharSet;
2020

2121
#[derive(Debug)]
22-
struct DisplayWrapper<'a, T: 'a, F: 'a>(&'a T, &'a F)
22+
struct DisplayWrapper<'a, T, F>(&'a T, &'a F)
2323
where
2424
F: Fn(&T, &mut fmt::Formatter<'_>) -> fmt::Result;
2525

unic/bidi/benches/bidi_basic_benches.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
extern crate test;
1616

17-
1817
use test::Bencher;
1918

2019
use unic_bidi::BidiInfo;

unic/bidi/benches/bidi_udhr_benches.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
extern crate test;
1616

17-
1817
use test::Bencher;
1918

2019
use unic_bidi::BidiInfo;

unic/bidi/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,13 @@
7171
//!
7272
//! [tr9]: https://www.unicode.org/reports/tr9/
7373
74-
75-
7674
#[macro_use]
7775
extern crate matches;
7876

7977
#[cfg(feature = "serde")]
8078
#[macro_use]
8179
extern crate serde;
8280

83-
84-
8581
pub use unic_ucd_bidi::UNICODE_VERSION;
8682
pub use unic_ucd_bidi::{bidi_class, BidiClass, BidiClassCategory};
8783

unic/bidi/tests/conformance_tests.rs

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
#![cfg(test)]
1313

14-
15-
16-
1714
use unic_bidi::{format_chars, level, BidiClass, BidiInfo, Level};
1815

1916
const BASIC_TEST_DATA: &str = include_str!("../../../external/unicode/ucd/data/BidiTest.txt");

unic/char/basics/tests/basic_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
unsafe_code
1717
)]
1818

19-
20-
2119
use unic_char_basics::unicode_notation;
2220

2321
/// Test Unicode Notation formatting for samples from Unicode Scalar Value range.

unic/char/basics/tests/coverage_tests.rs

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
unsafe_code
1717
)]
1818

19-
20-
21-
2219
use unic_char_basics::{is_noncharacter, is_private_use};
2320
use unic_char_range::CharRange;
2421

unic/char/property/tests/tables_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#[macro_use]
1212
extern crate unic_char_range;
1313

14-
15-
1614
use unic_char_property::tables::CharDataTable;
1715

1816
#[test]

unic/char/range/benches/benchmarks.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
extern crate test;
1414

15-
1615
use std::char;
1716
use unic_char_range::CharRange;
1817

unic/char/range/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
//! [`TrustedLen`]: https://doc.rust-lang.org/std/iter/trait.TrustedLen.html
5353
//!
5454
55-
56-
5755
mod pkg_info;
5856
pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
5957

unic/char/range/tests/iter_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
1311
use std::{char, u32, vec};
1412

1513
use unic_char_range::CharRange;

unic/emoji/char/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ extern crate unic_char_property;
2525
#[macro_use]
2626
extern crate unic_char_range;
2727

28-
2928
mod pkg_info;
3029
pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
3130

unic/examples/bidi_example.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#![forbid(unsafe_code)]
1313

14-
15-
1614
use unic::bidi::BidiInfo;
1715

1816
#[cfg_attr(rustfmt, rustfmt_skip)]

unic/examples/normal_example.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#![forbid(unsafe_code)]
1313

14-
15-
1614
use unic::normal::StrNormalForm;
1715
use unic::ucd::normal::compose;
1816

unic/examples/ucd_bidi_traits_example.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#![forbid(unsafe_code)]
1313

14-
15-
1614
use unic::ucd::bidi::{BidiClass, BidiClassCategory, CharBidiClass, StrBidiClass};
1715

1816
#[cfg_attr(rustfmt, rustfmt_skip)]

unic/idna/mapping/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323
//!
2424
//! * <https://www.unicode.org/reports/tr46/#IDNA_Mapping_Table>
2525
26-
2726
#[macro_use]
2827
extern crate unic_char_range;
2928

30-
3129
mod mapping;
3230

3331
use unic_ucd_version::UnicodeVersion;

unic/idna/punycode/tests/punycode_tests.rs

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
13-
14-
1512
use rustc_serialize::json::{self, Json};
1613
use unic_idna_punycode::{decode, encode_str};
1714

unic/idna/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
#[macro_use]
4848
extern crate matches;
4949

50-
51-
52-
53-
5450
use unic_idna_mapping as mapping;
5551
use unic_idna_punycode as punycode;
5652

unic/normal/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
//! }
3737
//! ```
3838
39-
40-
4139
mod decompose;
4240
mod recompose;
4341

unic/normal/tests/conformance_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#![cfg(test)]
1313

14-
15-
1614
use unic_normal::StrNormalForm;
1715

1816
type TestDatum = (

unic/segment/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@
7878
//! );
7979
//! ```
8080
81-
82-
83-
84-
8581
pub use unic_ucd_segment::UNICODE_VERSION;
8682

8783
mod pkg_info;

unic/segment/tests/basic_example.rs

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
13-
14-
1512
use unic_segment::{GraphemeIndices, Graphemes, WordBoundIndices, WordBounds, Words};
1613
use unic_ucd_common::is_alphanumeric;
1714

unic/segment/tests/grapheme_cluster_conformance_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
13-
1412
use unic_segment::Graphemes;
1513

1614
type TestData = &'static [(

unic/segment/tests/quickcheck_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#[macro_use]
1313
extern crate quickcheck;
1414

15-
16-
1715
use unic_segment::{Graphemes, WordBounds};
1816

1917
// QuickCheck Graphemes

unic/segment/tests/words_conformance_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
13-
1412
use unic_segment::{WordBoundIndices, WordBounds};
1513

1614
type TestData = &'static [(&'static str, &'static [&'static str])];

unic/tests/basics_test.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#![forbid(unsafe_code)]
1313

14-
15-
1614
use unic::bidi::BidiInfo;
1715
use unic::normal::StrNormalForm;
1816
use unic::segment::{GraphemeIndices, Graphemes, WordBoundIndices, WordBounds, Words};

unic/tests/char_range_integration_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
unsafe_code
1717
)]
1818

19-
2019
#[macro_use]
2120
extern crate unic_char_range;
2221

23-
2422
use unic_char::basics::{is_noncharacter, is_private_use, unicode_notation};
2523
use unic_char::range::CharRange;
2624
use unic_ucd::age::Age;

unic/ucd/age/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@
2626
//!
2727
//! * <https://www.unicode.org/reports/tr44/#Character_Age>
2828
29-
3029
#[macro_use]
3130
extern crate unic_char_range;
3231

33-
3432
pub use unic_ucd_version::UnicodeVersion;
3533

3634
mod pkg_info;

unic/ucd/age/tests/age_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#[macro_use]
1212
extern crate unic_char_range;
1313

14-
15-
1614
use unic_ucd_age::{Age, UnicodeVersion, UNICODE_VERSION};
1715

1816
/// Character *assignement* values always have Unicode Micro (Update) Version value of zero (`0`).

unic/ucd/bidi/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ extern crate unic_char_property;
3030
#[macro_use]
3131
extern crate unic_char_range;
3232

33-
34-
3533
mod pkg_info;
3634
pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
3735

unic/ucd/bidi/tests/basic_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
1311
#[test]
1412
fn test_bidi_class_display() {
1513
use unic_ucd_bidi::bidi_class::abbr_names::*;

unic/ucd/block/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#[macro_use]
2828
extern crate unic_char_range;
2929

30-
31-
3230
mod block;
3331
pub use crate::block::{Block, BlockIter};
3432

unic/ucd/block/tests/basic_tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
1211
use unic_ucd_block::{Block, BlockIter};
1312

1413
#[test]

unic/ucd/case/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ extern crate unic_char_property;
3030
#[macro_use]
3131
extern crate unic_char_range;
3232

33-
34-
3533
mod pkg_info;
3634
pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
3735

unic/ucd/category/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ extern crate unic_char_property;
5151
#[macro_use]
5252
extern crate unic_char_range;
5353

54-
5554
mod pkg_info;
5655
pub use crate::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
5756

unic/ucd/category/tests/basic_tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
1311
use unic_ucd_category::GeneralCategory as GC;
1412

1513
#[test]

unic/ucd/category/tests/major_category_tests.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
13-
1411
use unic_char_property::EnumeratedCharProperty;
1512
use unic_ucd_category::GeneralCategory;
1613

0 commit comments

Comments
 (0)