summaryrefslogtreecommitdiff
path: root/ext/napi/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/napi/lib.rs')
-rw-r--r--ext/napi/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs
index 24d7c7c11..b281fb9f2 100644
--- a/ext/napi/lib.rs
+++ b/ext/napi/lib.rs
@@ -529,7 +529,7 @@ where
let exports = v8::Object::new(scope);
let mut env_shared = EnvShared::new(napi_wrap);
- let cstr = CString::new(path.clone()).unwrap();
+ let cstr = CString::new(&*path).unwrap();
env_shared.filename = cstr.as_ptr();
std::mem::forget(cstr);