Remove some type variables and an explicit dereference.

This commit is contained in:
Ms2ger 2013-10-12 16:08:45 +02:00
parent 438d121cd8
commit f4edbb6b2e
4 changed files with 10 additions and 10 deletions

View file

@ -8,20 +8,20 @@ use dom::node::{ScriptView, Node, DocumentFragmentNodeTypeId};
use dom::node::{AbstractNode};
use dom::window::Window;
pub struct DocumentFragment<View> {
node: Node<View>,
pub struct DocumentFragment {
node: Node<ScriptView>,
}
impl DocumentFragment<ScriptView> {
impl DocumentFragment {
/// Creates a new DocumentFragment.
pub fn new(document: AbstractDocument) -> DocumentFragment<ScriptView> {
pub fn new(document: AbstractDocument) -> DocumentFragment {
DocumentFragment {
node: Node::new(DocumentFragmentNodeTypeId, document),
}
}
pub fn Constructor(owner: @mut Window) -> Fallible<AbstractNode<ScriptView>> {
let cx = (*owner.page).js_info.get_ref().js_compartment.cx.ptr;
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
let fragment = @DocumentFragment::new(owner.Document());
Ok(unsafe { Node::as_abstract_node(cx, fragment) })
}