mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove some as_slice calls.
This commit is contained in:
parent
4ee89363fb
commit
6a55ae06d7
34 changed files with 79 additions and 79 deletions
|
@ -1019,9 +1019,9 @@ pub mod longhands {
|
|||
try!(dest.write_str(" "));
|
||||
}
|
||||
first = false;
|
||||
try!(Token::QuotedString(pair.0.as_slice().into_cow()).to_css(dest));
|
||||
try!(Token::QuotedString((*pair.0).into_cow()).to_css(dest));
|
||||
try!(dest.write_str(" "));
|
||||
try!(Token::QuotedString(pair.1.as_slice().into_cow()).to_css(dest));
|
||||
try!(Token::QuotedString((*pair.1).into_cow()).to_css(dest));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -1381,12 +1381,10 @@ pub mod longhands {
|
|||
if let Ok(value) = input.try(|input| {
|
||||
match input.next() {
|
||||
Err(_) => Err(()),
|
||||
Ok(Token::Ident(ref ident)) if ident.as_slice()
|
||||
.eq_ignore_ascii_case("cover") => {
|
||||
Ok(Token::Ident(ref ident)) if ident.eq_ignore_ascii_case("cover") => {
|
||||
Ok(SpecifiedValue::Cover)
|
||||
}
|
||||
Ok(Token::Ident(ref ident)) if ident.as_slice()
|
||||
.eq_ignore_ascii_case("contain") => {
|
||||
Ok(Token::Ident(ref ident)) if ident.eq_ignore_ascii_case("contain") => {
|
||||
Ok(SpecifiedValue::Contain)
|
||||
}
|
||||
Ok(_) => Err(()),
|
||||
|
|
|
@ -888,7 +888,7 @@ pub mod specified {
|
|||
pub fn parse(input: &mut Parser) -> Result<Time,()> {
|
||||
match input.next() {
|
||||
Ok(Token::Dimension(ref value, ref unit)) => {
|
||||
Time::parse_dimension(value.value, unit.as_slice())
|
||||
Time::parse_dimension(value.value, &unit)
|
||||
}
|
||||
_ => Err(()),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue