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>> {
|
||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
||||
self.borrow().encode(s);
|
||||
Ok(())
|
||||
self.borrow().encode(s)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> {
|
|||
// Step 1.
|
||||
let mut doc = Document::new(&win.root_ref(), None, NonHTMLDocument, None).root();
|
||||
// Step 2-3.
|
||||
let mut maybe_elem = if qname.is_empty() {
|
||||
let maybe_elem = if qname.is_empty() {
|
||||
None
|
||||
} else {
|
||||
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;
|
||||
unsafe {
|
||||
JS::from_raw(node).encode(s)
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue