diff --git a/crates/quickjs-wasm-rs/CHANGELOG.md b/crates/quickjs-wasm-rs/CHANGELOG.md index b6d0a04d..62733a71 100644 --- a/crates/quickjs-wasm-rs/CHANGELOG.md +++ b/crates/quickjs-wasm-rs/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed +- Make `JSContextRef::wrap_rust_value` private. Similar to + `context::get_rust_value` this function is simply an internal detail. + ## [2.0.1] - 2023-09-11 ### Fixed diff --git a/crates/quickjs-wasm-rs/src/js_binding/context.rs b/crates/quickjs-wasm-rs/src/js_binding/context.rs index 48ee7690..2357e0ec 100644 --- a/crates/quickjs-wasm-rs/src/js_binding/context.rs +++ b/crates/quickjs-wasm-rs/src/js_binding/context.rs @@ -315,7 +315,7 @@ impl JSContextRef { } /// Wrap the specified Rust value in a JS value - pub fn wrap_rust_value<T: 'static>(&self, value: T) -> Result<JSValueRef> { + fn wrap_rust_value<T: 'static>(&self, value: T) -> Result<JSValueRef> { // Note the use of `RefCell` to provide checked unique references. Since JS values can be arbitrarily // aliased, we need `RefCell`'s dynamic borrow checking to prevent unsound access. let pointer = Box::into_raw(Box::new(RefCell::new(value)));