Skip to content

Commit

Permalink
remove use std::ascii::AsciiExt for Rust 1.23 (#411)
Browse files Browse the repository at this point in the history
In Rust 1.23, the `AsciiExt` methods are implemented directly on the
concerned types, so attempting to import `AsciiExt` results in an
unused import.

Rust language PR:
rust-lang/rust#44042

PSA:
https://users.rust-lang.org/t/psa-dealing-with-warning-unused-import-std-ascii-asciiext-in-today-s-nightly/13726

This started warning as an unused import on nightly sometime between
2017-11-02 and 2017-11-09:

https://travis-ci.org/exercism/rust/builds/296391447
https://travis-ci.org/exercism/rust/builds/299770403

This started warning on beta exactly when 1.23.0 became Beta (it was
accepted on 1.22.0):

https://travis-ci.org/exercism/rust/builds/303139434
https://travis-ci.org/exercism/rust/builds/306431846

As 1.23 is now stable and our repo disallows warnings on stable, we will
need this.
  • Loading branch information
petertseng authored Jan 15, 2018
1 parent 1e39915 commit 8ba3021
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions exercises/atbash-cipher/example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::ascii::AsciiExt;

fn ascii(ch: char) -> u8 {
ch as u8
}
Expand Down
2 changes: 0 additions & 2 deletions exercises/crypto-square/example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::ascii::AsciiExt;

extern crate itertools;
use itertools::Itertools;

Expand Down
1 change: 0 additions & 1 deletion exercises/etl/example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::ascii::AsciiExt;
use std::collections::BTreeMap;

pub fn transform(input: &BTreeMap<i32, Vec<char>>) -> BTreeMap<char, i32> {
Expand Down
1 change: 0 additions & 1 deletion exercises/forth/example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::ascii::AsciiExt;
use std::collections::HashMap;
use std::collections::LinkedList;
use std::str::FromStr;
Expand Down
1 change: 0 additions & 1 deletion exercises/pangram/example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::BTreeSet;
use std::ascii::AsciiExt;
use std::iter::FromIterator;

pub fn is_pangram(sentence: &str) -> bool {
Expand Down

0 comments on commit 8ba3021

Please sign in to comment.