Auto merge of #9184 - servo:clippy, r=frewsxcv

Fix some clippy warnings.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9184)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-07 20:13:03 +05:30
commit 72ecbbe221
2 changed files with 3 additions and 4 deletions

View file

@ -44,7 +44,7 @@ impl CustomEvent {
detail: HandleValue)
-> Root<CustomEvent> {
let ev = CustomEvent::new_uninitialized(global);
ev.init_custom_event(global.get_cx(), type_, bubbles, cancelable, detail);
ev.init_custom_event(type_, bubbles, cancelable, detail);
ev
}
#[allow(unsafe_code)]
@ -60,7 +60,6 @@ impl CustomEvent {
}
fn init_custom_event(&self,
_cx: *mut JSContext,
type_: Atom,
can_bubble: bool,
cancelable: bool,
@ -88,7 +87,7 @@ impl CustomEventMethods for CustomEvent {
can_bubble: bool,
cancelable: bool,
detail: HandleValue) {
self.init_custom_event(_cx, Atom::from(&*type_), can_bubble, cancelable, detail)
self.init_custom_event(Atom::from(&*type_), can_bubble, cancelable, detail)
}
// https://dom.spec.whatwg.org/#dom-event-istrusted

View file

@ -239,7 +239,7 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
.map(CanvasRenderingContext2DOrWebGLRenderingContext::eCanvasRenderingContext2D)
}
"webgl" | "experimental-webgl" => {
self.get_or_init_webgl_context(cx, attributes.get(0).map(|p| *p))
self.get_or_init_webgl_context(cx, attributes.get(0).cloned())
.map(CanvasRenderingContext2DOrWebGLRenderingContext::eWebGLRenderingContext)
}
_ => None