mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix a bunch of clippy lints
This commit is contained in:
parent
b1ca3d1cdf
commit
6b215f38ee
58 changed files with 281 additions and 356 deletions
|
@ -486,7 +486,7 @@ impl RootCollection {
|
|||
}
|
||||
|
||||
/// Start tracking a stack-based root
|
||||
fn root<'b>(&self, untracked_reflector: *const Reflector) {
|
||||
fn root(&self, untracked_reflector: *const Reflector) {
|
||||
debug_assert!(task_state::get().is_script());
|
||||
unsafe {
|
||||
let mut roots = &mut *self.roots.get();
|
||||
|
@ -496,7 +496,7 @@ impl RootCollection {
|
|||
}
|
||||
|
||||
/// Stop tracking a stack-based root, asserting if the reflector isn't found
|
||||
fn unroot<'b, T: Reflectable>(&self, rooted: &Root<T>) {
|
||||
fn unroot<T: Reflectable>(&self, rooted: &Root<T>) {
|
||||
debug_assert!(task_state::get().is_script());
|
||||
unsafe {
|
||||
let mut roots = &mut *self.roots.get();
|
||||
|
|
|
@ -148,9 +148,10 @@ pub fn xml_name_type(name: &str) -> XMLName {
|
|||
return XMLName::InvalidXMLName;
|
||||
}
|
||||
if c == ':' {
|
||||
match seen_colon {
|
||||
true => non_qname_colons = true,
|
||||
false => seen_colon = true,
|
||||
if seen_colon {
|
||||
non_qname_colons = true;
|
||||
} else {
|
||||
seen_colon = true;
|
||||
}
|
||||
}
|
||||
last = c
|
||||
|
@ -160,9 +161,10 @@ pub fn xml_name_type(name: &str) -> XMLName {
|
|||
non_qname_colons = true
|
||||
}
|
||||
|
||||
match non_qname_colons {
|
||||
false => XMLName::QName,
|
||||
true => XMLName::Name,
|
||||
if non_qname_colons {
|
||||
XMLName::Name
|
||||
} else {
|
||||
XMLName::QName
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue