From 1fb147eb5edeb54013c70379ad778babbcf560a3 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 13 Feb 2023 16:03:29 +0000 Subject: [PATCH] Ensure custom JavaScript classes are cloneable --- lib/src/fnc/script/classes/duration.rs | 1 + lib/src/fnc/script/classes/record.rs | 1 + lib/src/fnc/script/classes/uuid.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/src/fnc/script/classes/duration.rs b/lib/src/fnc/script/classes/duration.rs index 4a96b849..9426c560 100644 --- a/lib/src/fnc/script/classes/duration.rs +++ b/lib/src/fnc/script/classes/duration.rs @@ -10,6 +10,7 @@ pub mod duration { #[derive(Clone)] #[quickjs(class)] + #[quickjs(cloneable)] pub struct Duration { #[quickjs(hide)] pub(crate) value: String, diff --git a/lib/src/fnc/script/classes/record.rs b/lib/src/fnc/script/classes/record.rs index b0a16f40..f9cfdd26 100644 --- a/lib/src/fnc/script/classes/record.rs +++ b/lib/src/fnc/script/classes/record.rs @@ -10,6 +10,7 @@ pub mod record { #[derive(Clone)] #[quickjs(class)] + #[quickjs(cloneable)] pub struct Record { #[quickjs(hide)] pub(crate) tb: String, diff --git a/lib/src/fnc/script/classes/uuid.rs b/lib/src/fnc/script/classes/uuid.rs index 849b9c60..f9d6555c 100644 --- a/lib/src/fnc/script/classes/uuid.rs +++ b/lib/src/fnc/script/classes/uuid.rs @@ -10,6 +10,7 @@ pub mod uuid { #[derive(Clone)] #[quickjs(class)] + #[quickjs(cloneable)] pub struct Uuid { #[quickjs(hide)] pub(crate) value: String,