diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index ac8da0f8ba6..e3d7247da5a 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -42,7 +42,6 @@ //! - `OptionalRootable` and `OptionalRootedRootable`: make rooting `Option` values easy via a `root` method //! - `ResultRootable`: make rooting successful `Result` values easy //! - `TemporaryPushable`: allows mutating vectors of `JS` with new elements of `JSRef`/`Temporary` -//! - `OptionalSettable`: allows assigning `Option` values of `JSRef`/`Temporary` to fields of `Option>` //! - `RootedReference`: makes obtaining an `Option>` from an `Option>` easy use dom::bindings::trace::JSTraceable; @@ -367,18 +366,6 @@ impl Assignable for Temporary { } } -/// Assign an optional rootable value (either of `JS` or `Temporary`) to an optional -/// field of a DOM type (ie. `Option>`) -pub trait OptionalSettable { - fn assign(&self, val: Option); -} - -impl, U: Reflectable> OptionalSettable for Cell>> { - fn assign(&self, val: Option) { - self.set(val.map(|val| unsafe { val.get_js() })); - } -} - /// Root a rootable `Option` type (used for `Option>`) pub trait OptionalRootable { diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 22334b3b2a1..f01dc20a7e1 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -23,7 +23,7 @@ use dom::bindings::error::{ErrorResult, Fallible}; use dom::bindings::error::Error::{NotSupported, InvalidCharacter}; use dom::bindings::error::Error::{HierarchyRequest, NamespaceError}; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{MutNullableJS, JS, JSRef, Temporary, OptionalSettable, TemporaryPushable}; +use dom::bindings::js::{MutNullableJS, JS, JSRef, Temporary, TemporaryPushable}; use dom::bindings::js::{OptionalRootable, RootedReference}; use dom::bindings::utils::reflect_dom_object; use dom::bindings::utils::xml_name_type; diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index 76c785ee4eb..11a45bbc208 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::InheritTypes::{EventCast, UIEventCast, MouseEventDerived}; use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{MutNullableJS, JSRef, RootedReference, Temporary, OptionalSettable}; +use dom::bindings::js::{MutNullableJS, JSRef, RootedReference, Temporary}; use dom::bindings::utils::reflect_dom_object; use dom::event::{Event, EventTypeId}; use dom::eventtarget::EventTarget; diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index fb336efd85b..83c14208cbb 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -24,7 +24,7 @@ use dom::bindings::error::Fallible; use dom::bindings::error::Error::{NotFound, HierarchyRequest, Syntax}; use dom::bindings::global::GlobalRef; use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, Root}; -use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable}; +use dom::bindings::js::{TemporaryPushable, OptionalRootedRootable}; use dom::bindings::js::{ResultRootable, OptionalRootable, MutNullableJS}; use dom::bindings::trace::JSTraceable; use dom::bindings::utils::{Reflectable, reflect_dom_object}; diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs index dc6dbb8c756..33c539dd150 100644 --- a/components/script/dom/uievent.rs +++ b/components/script/dom/uievent.rs @@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::InheritTypes::{EventCast, UIEventDerived}; use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{MutNullableJS, JSRef, RootedReference, Temporary, OptionalSettable}; +use dom::bindings::js::{MutNullableJS, JSRef, RootedReference, Temporary}; use dom::bindings::utils::reflect_dom_object; use dom::event::{Event, EventTypeId};