mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
script_bindings: Eliminate DOMString::from_string (#43089)
This method is the same as `DOMString::from` with a `String` argument and `From` and `Into` are preferred when writing modern Rust. Testing: This should not change behavior and is thus covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
@@ -79,7 +79,7 @@ impl CSSImportRuleMethods<crate::DomTypeHolder> for CSSImportRule {
|
||||
match &self.import_rule.borrow().read_with(&guard).layer {
|
||||
ImportLayer::None => None,
|
||||
ImportLayer::Anonymous => Some(DOMString::new()),
|
||||
ImportLayer::Named(name) => Some(DOMString::from_string(name.to_css_string())),
|
||||
ImportLayer::Named(name) => Some(name.to_css_string().into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user