Jelajahi Sumber

Remove AsciiExt

It is deprecated since 1.26.0 if the inherent
methods, that are stable since 1.23.0,
want to be relied on.
est31 7 tahun lalu
induk
melakukan
5ae0998d22
6 mengubah file dengan 0 tambahan dan 10 penghapusan
  1. 0 2
      idna/src/punycode.rs
  2. 0 2
      idna/src/uts46.rs
  3. 0 1
      percent_encoding/lib.rs
  4. 0 1
      src/form_urlencoded.rs
  5. 0 3
      src/parser.rs
  6. 0 1
      tests/unit.rs

+ 0 - 2
idna/src/punycode.rs

@@ -15,8 +15,6 @@
 
 
 use std::u32;
 use std::u32;
 use std::char;
 use std::char;
-#[allow(unused_imports, deprecated)]
-use std::ascii::AsciiExt;
 
 
 // Bootstring parameters for Punycode
 // Bootstring parameters for Punycode
 static BASE: u32 = 36;
 static BASE: u32 = 36;

+ 0 - 2
idna/src/uts46.rs

@@ -11,8 +11,6 @@
 
 
 use self::Mapping::*;
 use self::Mapping::*;
 use punycode;
 use punycode;
-#[allow(unused_imports, deprecated)]
-use std::ascii::AsciiExt;
 use std::cmp::Ordering::{Equal, Less, Greater};
 use std::cmp::Ordering::{Equal, Less, Greater};
 use unicode_bidi::{BidiClass, bidi_class};
 use unicode_bidi::{BidiClass, bidi_class};
 use unicode_normalization::UnicodeNormalization;
 use unicode_normalization::UnicodeNormalization;

+ 0 - 1
percent_encoding/lib.rs

@@ -32,7 +32,6 @@
 //! assert_eq!(utf8_percent_encode("foo bar?", DEFAULT_ENCODE_SET).to_string(), "foo%20bar%3F");
 //! assert_eq!(utf8_percent_encode("foo bar?", DEFAULT_ENCODE_SET).to_string(), "foo%20bar%3F");
 //! ```
 //! ```
 
 
-use std::ascii::AsciiExt;
 use std::borrow::Cow;
 use std::borrow::Cow;
 use std::fmt;
 use std::fmt;
 use std::slice;
 use std::slice;

+ 0 - 1
src/form_urlencoded.rs

@@ -55,7 +55,6 @@ pub fn parse_with_encoding<'a>(input: &'a [u8],
                                encoding_override: Option<::encoding::EncodingRef>,
                                encoding_override: Option<::encoding::EncodingRef>,
                                use_charset: bool)
                                use_charset: bool)
                                -> Result<Parse<'a>, ()> {
                                -> Result<Parse<'a>, ()> {
-    use std::ascii::AsciiExt;
 
 
     let mut encoding = EncodingOverride::from_opt_encoding(encoding_override);
     let mut encoding = EncodingOverride::from_opt_encoding(encoding_override);
     if !(encoding.is_utf8() || input.is_ascii()) {
     if !(encoding.is_utf8() || input.is_ascii()) {

+ 0 - 3
src/parser.rs

@@ -6,9 +6,6 @@
 // option. This file may not be copied, modified, or distributed
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 // except according to those terms.
 
 
-#[allow(unused_imports, deprecated)]
-use std::ascii::AsciiExt;
-
 use std::error::Error;
 use std::error::Error;
 use std::fmt::{self, Formatter, Write};
 use std::fmt::{self, Formatter, Write};
 use std::str;
 use std::str;

+ 0 - 1
tests/unit.rs

@@ -11,7 +11,6 @@
 #[macro_use]
 #[macro_use]
 extern crate url;
 extern crate url;
 
 
-use std::ascii::AsciiExt;
 use std::borrow::Cow;
 use std::borrow::Cow;
 use std::cell::{Cell, RefCell};
 use std::cell::{Cell, RefCell};
 use std::net::{Ipv4Addr, Ipv6Addr};
 use std::net::{Ipv4Addr, Ipv6Addr};