mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Clippy: Fixed some clippy warnings (#31818)
* Fixed clippy warnings * made changes for lowercase characters. * changed is_lowercase() to is_ascii_lowercase() * added std library function `is_ascii_uppercase()` and `is_ascii_lowercase()` * made recommended changes
This commit is contained in:
parent
3c05b58221
commit
566fd475d9
11 changed files with 57 additions and 68 deletions
|
@ -92,10 +92,10 @@ impl VirtualMethods for HTMLFontElement {
|
|||
}
|
||||
|
||||
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&local_name!("face") => AttrValue::from_atomic(value.into()),
|
||||
&local_name!("color") => AttrValue::from_legacy_color(value.into()),
|
||||
&local_name!("size") => parse_size(&value),
|
||||
match *name {
|
||||
local_name!("face") => AttrValue::from_atomic(value.into()),
|
||||
local_name!("color") => AttrValue::from_legacy_color(value.into()),
|
||||
local_name!("size") => parse_size(&value),
|
||||
_ => self
|
||||
.super_type()
|
||||
.unwrap()
|
||||
|
@ -174,7 +174,7 @@ fn parse_size(mut input: &str) -> AttrValue {
|
|||
|
||||
// Step 9
|
||||
match parse_mode {
|
||||
ParseMode::RelativePlus => value = 3 + value,
|
||||
ParseMode::RelativePlus => value += 3,
|
||||
ParseMode::RelativeMinus => value = 3 - value,
|
||||
ParseMode::Absolute => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue