mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix map_flatten
warning in components/script
(#32110)
* clippy: Fix map_flatten warning * refactor: Change plain comments to rustdoc comments
This commit is contained in:
parent
f89c53bd51
commit
2a967119c7
1 changed files with 3 additions and 4 deletions
|
@ -112,8 +112,7 @@ impl CSSRuleList {
|
|||
let owner = self
|
||||
.parent_stylesheet
|
||||
.get_owner()
|
||||
.map(DomRoot::downcast::<HTMLElement>)
|
||||
.flatten();
|
||||
.and_then(DomRoot::downcast::<HTMLElement>);
|
||||
let loader = owner
|
||||
.as_ref()
|
||||
.map(|element| StylesheetLoader::for_element(element));
|
||||
|
@ -135,7 +134,7 @@ impl CSSRuleList {
|
|||
Ok(idx)
|
||||
}
|
||||
|
||||
// In case of a keyframe rule, index must be valid.
|
||||
/// In case of a keyframe rule, index must be valid.
|
||||
pub fn remove_rule(&self, index: u32) -> ErrorResult {
|
||||
let index = index as usize;
|
||||
let mut guard = self.parent_stylesheet.shared_lock().write();
|
||||
|
@ -163,7 +162,7 @@ impl CSSRuleList {
|
|||
}
|
||||
}
|
||||
|
||||
// Remove parent stylesheets from all children
|
||||
/// Remove parent stylesheets from all children
|
||||
pub fn deparent_all(&self) {
|
||||
for rule in self.dom_rules.borrow().iter() {
|
||||
if let Some(r) = rule.get() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue