mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove usage of the deprecated OwnedAsciiExt
This commit is contained in:
parent
85aa1658cc
commit
6737be1fb1
5 changed files with 7 additions and 7 deletions
|
@ -22,7 +22,7 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, NodeTypeId, document_fr
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use std::ascii::OwnedAsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use util::str::DOMString;
|
use util::str::DOMString;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
@ -86,7 +86,8 @@ impl<'a> HTMLButtonElementMethods for &'a HTMLButtonElement {
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-button-type
|
// https://html.spec.whatwg.org/multipage/#dom-button-type
|
||||||
fn Type(self) -> DOMString {
|
fn Type(self) -> DOMString {
|
||||||
let elem = ElementCast::from_ref(self);
|
let elem = ElementCast::from_ref(self);
|
||||||
let ty = elem.get_string_attribute(&atom!("type")).into_ascii_lowercase();
|
let mut ty = elem.get_string_attribute(&atom!("type"));
|
||||||
|
ty.make_ascii_lowercase();
|
||||||
// https://html.spec.whatwg.org/multipage/#attr-button-type
|
// https://html.spec.whatwg.org/multipage/#attr-button-type
|
||||||
match &*ty {
|
match &*ty {
|
||||||
"reset" | "button" | "menu" => ty,
|
"reset" | "button" | "menu" => ty,
|
||||||
|
|
|
@ -35,7 +35,6 @@ use hyper::mime;
|
||||||
use msg::constellation_msg::LoadData;
|
use msg::constellation_msg::LoadData;
|
||||||
use util::str::DOMString;
|
use util::str::DOMString;
|
||||||
use script_task::{ScriptChan, ScriptMsg};
|
use script_task::{ScriptChan, ScriptMsg};
|
||||||
use std::ascii::OwnedAsciiExt;
|
|
||||||
use url::UrlParser;
|
use url::UrlParser;
|
||||||
use url::form_urlencoded::serialize;
|
use url::form_urlencoded::serialize;
|
||||||
use string_cache::Atom;
|
use string_cache::Atom;
|
||||||
|
|
|
@ -38,7 +38,6 @@ use msg::constellation_msg::ConstellationChan;
|
||||||
use util::str::DOMString;
|
use util::str::DOMString;
|
||||||
use string_cache::Atom;
|
use string_cache::Atom;
|
||||||
|
|
||||||
use std::ascii::OwnedAsciiExt;
|
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,10 @@ macro_rules! make_enumerated_getter(
|
||||||
use dom::bindings::codegen::InheritTypes::ElementCast;
|
use dom::bindings::codegen::InheritTypes::ElementCast;
|
||||||
use string_cache::Atom;
|
use string_cache::Atom;
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
|
use std::ascii::AsciiExt;
|
||||||
let element = ElementCast::from_ref(self);
|
let element = ElementCast::from_ref(self);
|
||||||
let val = element.get_string_attribute(&Atom::from_slice($htmlname))
|
let mut val = element.get_string_attribute(&Atom::from_slice($htmlname));
|
||||||
.into_ascii_lowercase();
|
val.make_ascii_lowercase();
|
||||||
// https://html.spec.whatwg.org/multipage/#attr-fs-method
|
// https://html.spec.whatwg.org/multipage/#attr-fs-method
|
||||||
match &*val {
|
match &*val {
|
||||||
$($choices)|+ => val,
|
$($choices)|+ => val,
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#![feature(append)]
|
#![feature(append)]
|
||||||
#![feature(arc_unique)]
|
#![feature(arc_unique)]
|
||||||
|
#![feature(ascii)]
|
||||||
#![feature(as_slice)]
|
#![feature(as_slice)]
|
||||||
#![feature(as_unsafe_cell)]
|
#![feature(as_unsafe_cell)]
|
||||||
#![feature(borrow_state)]
|
#![feature(borrow_state)]
|
||||||
|
@ -17,7 +18,6 @@
|
||||||
#![feature(hashmap_hasher)]
|
#![feature(hashmap_hasher)]
|
||||||
#![feature(mpsc_select)]
|
#![feature(mpsc_select)]
|
||||||
#![feature(nonzero)]
|
#![feature(nonzero)]
|
||||||
#![feature(owned_ascii_ext)]
|
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(rc_unique)]
|
#![feature(rc_unique)]
|
||||||
#![feature(slice_chars)]
|
#![feature(slice_chars)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue