mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Fix some unused_mut/unused_result warnings
This commit is contained in:
parent
310d2a19bb
commit
1008a536a7
3 changed files with 3 additions and 5 deletions
|
@ -138,8 +138,7 @@ impl<T> DerefMut<T> for Traceable<T> {
|
||||||
|
|
||||||
impl<S: Encoder<E>, E, T: Encodable<S, E>> Encodable<S, E> for Traceable<RefCell<T>> {
|
impl<S: Encoder<E>, E, T: Encodable<S, E>> Encodable<S, E> for Traceable<RefCell<T>> {
|
||||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
fn encode(&self, s: &mut S) -> Result<(), E> {
|
||||||
self.borrow().encode(s);
|
self.borrow().encode(s)
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
||||||
// Step 1.
|
// Step 1.
|
||||||
let mut doc = Document::new(&win.root_ref(), None, NonHTMLDocument, None).root();
|
let mut doc = Document::new(&win.root_ref(), None, NonHTMLDocument, None).root();
|
||||||
// Step 2-3.
|
// Step 2-3.
|
||||||
let mut maybe_elem = if qname.is_empty() {
|
let maybe_elem = if qname.is_empty() {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
match doc.CreateElementNS(namespace, qname) {
|
match doc.CreateElementNS(namespace, qname) {
|
||||||
|
|
|
@ -73,8 +73,7 @@ impl<S: Encoder<E>, E> Encodable<S, E> for TrustedNodeAddress {
|
||||||
let node = addr as *Node as *mut Node;
|
let node = addr as *Node as *mut Node;
|
||||||
unsafe {
|
unsafe {
|
||||||
JS::from_raw(node).encode(s)
|
JS::from_raw(node).encode(s)
|
||||||
};
|
}
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue