Skip to content

Commit fabde85

Browse files
committed
change the ToJs impl to only apply to Sized types
1 parent 2227a28 commit fabde85

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

wsdom-core/src/serialize.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ impl<'a> UseInJsCode for RawCodeImmediate<'a> {
6666
///
6767
/// For example, `ToJs<JsNumber>` means serializable to the same type that
6868
/// `JsNumber` serializes to.
69-
pub trait ToJs<JsType>
70-
where
71-
Self: UseInJsCode,
72-
JsType: ?Sized,
73-
{
74-
}
69+
pub trait ToJs<JsType>: UseInJsCode {}
7570

76-
impl<T: ?Sized> ToJs<T> for T where T: UseInJsCode {}
71+
impl<T> ToJs<T> for T where T: UseInJsCode {}

0 commit comments

Comments
 (0)