Skip to content

Commit dea6dcb

Browse files
committed
Remove use of deprecated AsciiExt trait
1 parent be0acdf commit dea6dcb

File tree

7 files changed

+1
-14
lines changed

7 files changed

+1
-14
lines changed

macros/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ extern crate syn;
1313

1414
use proc_macro2::{TokenStream, TokenTree};
1515
use quote::TokenStreamExt;
16-
#[allow(unused_imports)]
17-
use std::ascii::AsciiExt;
1816
use std::iter;
1917

2018
define_proc_macros! {

src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub fn _internal__to_lowercase<'a>(buffer: &'a mut [u8], input: &'a str) -> Opti
132132
if let Some(buffer) = buffer.get_mut(..input.len()) {
133133
if let Some(first_uppercase) = input.bytes().position(|byte| matches!(byte, b'A'...b'Z')) {
134134
buffer.copy_from_slice(input.as_bytes());
135-
::std::ascii::AsciiExt::make_ascii_lowercase(&mut buffer[first_uppercase..]);
135+
buffer[first_uppercase..].make_ascii_lowercase();
136136
// `buffer` was initialized to a copy of `input` (which is &str so well-formed UTF-8)
137137
// then lowercased (which preserves UTF-8 well-formedness)
138138
unsafe { Some(::std::str::from_utf8_unchecked(buffer)) }

src/nth.rs

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
#[allow(unused_imports)]
6-
use std::ascii::AsciiExt;
7-
85
use super::{BasicParseError, Parser, ParserInput, Token};
96

107
/// Parse the *An+B* notation, as found in the `:nth-child()` selector.

src/parser.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use cow_rc_str::CowRcStr;
66
use smallvec::SmallVec;
7-
#[allow(unused_imports)]
8-
use std::ascii::AsciiExt;
97
use std::ops::BitOr;
108
use std::ops::Range;
119
use tokenizer::{SourceLocation, SourcePosition, Token, Tokenizer};

src/rules_and_declarations.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use super::{BasicParseError, BasicParseErrorKind, Delimiter};
88
use super::{ParseError, Parser, SourceLocation, Token};
99
use cow_rc_str::CowRcStr;
1010
use parser::{parse_nested_block, parse_until_after, parse_until_before, ParserState};
11-
#[allow(unused_imports)]
12-
use std::ascii::AsciiExt;
1311

1412
/// Parse `!important`.
1513
///

src/serializer.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use dtoa_short::{self, Notation};
66
use itoa;
7-
#[allow(unused_imports)]
8-
use std::ascii::AsciiExt;
97
use std::fmt::{self, Write};
108
use std::io;
119
use std::str;

src/tokenizer.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
// https://drafts.csswg.org/css-syntax/#tokenization
66

7-
#[allow(unused_imports)]
8-
use std::ascii::AsciiExt;
97
use std::char;
108
use std::i32;
119
use std::ops::Range;

0 commit comments

Comments
 (0)