From 4778780073ab585dbf29b2039456c3fbd810d46a Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Sun, 8 Sep 2024 22:49:27 -0700 Subject: [PATCH] Add support for Trace, Finalize and JsData for Convert<> (#3970) --- core/engine/src/value/conversions/convert.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/engine/src/value/conversions/convert.rs b/core/engine/src/value/conversions/convert.rs index ea92b23943..a73344d685 100644 --- a/core/engine/src/value/conversions/convert.rs +++ b/core/engine/src/value/conversions/convert.rs @@ -7,9 +7,10 @@ //! if necessary). use boa_engine::JsNativeError; +use boa_gc::{Finalize, Trace}; use crate::value::TryFromJs; -use crate::{Context, JsResult, JsString, JsValue}; +use crate::{Context, JsData, JsResult, JsString, JsValue}; /// A wrapper type that allows converting a `JsValue` to a specific type. /// This is useful when you want to convert a `JsValue` to a Rust type. @@ -42,7 +43,7 @@ use crate::{Context, JsResult, JsString, JsValue}; /// assert_eq!(conv5, true); /// assert_eq!(conv_nan, false); /// ``` -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq, Trace, Finalize, JsData)] pub struct Convert(pub T); impl From for Convert {