Fix warnings in script.

This commit is contained in:
Ms2ger 2015-03-23 10:37:49 +01:00
parent 1f682d878d
commit 6b69fec7fe
5 changed files with 6 additions and 7 deletions

View file

@ -1461,7 +1461,7 @@ impl DocumentProgressHandler {
subpage_id, subpage_id,
"mozbrowserloadend".to_owned(), "mozbrowserloadend".to_owned(),
None); None);
chan.send(event); chan.send(event).unwrap();
} }
} }

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
use dom::bindings::codegen::Bindings::HTMLHeadElementBinding; use dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
@ -51,7 +50,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLHeadElement> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }
fn bind_to_tree(&self, tree_in_doc: bool) { fn bind_to_tree(&self, _tree_in_doc: bool) {
if !opts::get().userscripts { if !opts::get().userscripts {
return; return;
} }
@ -79,7 +78,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLHeadElement> {
let new_script = new_script.r(); let new_script = new_script.r();
new_script.set_string_attribute(&atom!("src"), name); new_script.set_string_attribute(&atom!("src"), name);
let new_script_node: &JSRef<Node> = NodeCast::from_borrowed_ref(&new_script); let new_script_node: &JSRef<Node> = NodeCast::from_borrowed_ref(&new_script);
node.InsertBefore(*new_script_node, first_child.r()); node.InsertBefore(*new_script_node, first_child.r()).unwrap();
} }
} }
} }

View file

@ -19,7 +19,7 @@ use dom::customevent::CustomEvent;
use dom::document::Document; use dom::document::Document;
use dom::element::Element; use dom::element::Element;
use dom::element::AttributeHandlers; use dom::element::AttributeHandlers;
use dom::event::{Event, EventBubbles, EventCancelable, EventHelpers}; use dom::event::{Event, EventHelpers};
use dom::eventtarget::{EventTarget, EventTargetTypeId}; use dom::eventtarget::{EventTarget, EventTargetTypeId};
use dom::element::ElementTypeId; use dom::element::ElementTypeId;
use dom::htmlelement::{HTMLElement, HTMLElementTypeId}; use dom::htmlelement::{HTMLElement, HTMLElementTypeId};

View file

@ -6,14 +6,15 @@
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(collections)] #![feature(collections)]
#![feature(core)] #![feature(core)]
#![feature(custom_attribute)]
#![feature(int_uint)] #![feature(int_uint)]
#![feature(old_io)] #![feature(old_io)]
#![feature(path)]
#![feature(plugin)] #![feature(plugin)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(std_misc)] #![feature(std_misc)]
#![feature(unicode)] #![feature(unicode)]
#![feature(unsafe_destructor)] #![feature(unsafe_destructor)]
#![feature(custom_attribute)]
#![deny(unsafe_code)] #![deny(unsafe_code)]
#![allow(non_snake_case)] #![allow(non_snake_case)]

View file

@ -24,7 +24,6 @@ use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, Documen
use dom::bindings::codegen::InheritTypes::{ElementCast, EventTargetCast, HTMLIFrameElementCast, NodeCast, EventCast}; use dom::bindings::codegen::InheritTypes::{ElementCast, EventTargetCast, HTMLIFrameElementCast, NodeCast, EventCast};
use dom::bindings::conversions::FromJSValConvertible; use dom::bindings::conversions::FromJSValConvertible;
use dom::bindings::conversions::StringificationBehavior; use dom::bindings::conversions::StringificationBehavior;
use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable, RootedReference}; use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable, RootedReference};
use dom::bindings::js::{RootCollection, RootCollectionPtr}; use dom::bindings::js::{RootCollection, RootCollectionPtr};
use dom::bindings::refcounted::{LiveDOMReferences, Trusted, TrustedReference}; use dom::bindings::refcounted::{LiveDOMReferences, Trusted, TrustedReference};