mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to `Deref`. In particular, `Deref` for: * `String` -> `str` * `Atom` -> `str` The latter of those two requires, a bump of the locked `string-cache` library
This commit is contained in:
parent
b8ea10bfe3
commit
d838fcce30
19 changed files with 98 additions and 102 deletions
|
@ -53,7 +53,7 @@ impl DOMImplementation {
|
|||
impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
||||
// http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
|
||||
fn CreateDocumentType(self, qname: DOMString, pubid: DOMString, sysid: DOMString) -> Fallible<Temporary<DocumentType>> {
|
||||
match xml_name_type(qname.as_slice()) {
|
||||
match xml_name_type(&qname) {
|
||||
// Step 1.
|
||||
InvalidXMLName => Err(InvalidCharacter),
|
||||
// Step 2.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue