mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +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:
@@ -83,7 +83,7 @@ impl CSSLayerStatementRuleMethods<crate::DomTypeHolder> for CSSLayerStatementRul
|
||||
.borrow()
|
||||
.names
|
||||
.iter()
|
||||
.map(|name| DOMString::from_string(name.to_css_string()))
|
||||
.map(|name| name.to_css_string().into())
|
||||
.collect();
|
||||
to_frozen_array(names.as_slice(), cx, retval, can_gc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user