Skip to content

Commit

Permalink
fix: passing option as &str caused memory leak in `builtin:swc-load…
Browse files Browse the repository at this point in the history
…er` (#4235)

fix: use `String` instead of `&str`
  • Loading branch information
h-a-n-a authored Sep 25, 2023
1 parent f816657 commit 591f55d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/node_binding/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use rspack_binding_options::{run_builtin_loader as run_builtin, JsLoaderContext}
#[allow(unused)]
pub async fn run_builtin_loader(
builtin: String,
options: Option<&str>,
options: Option<String>,
loader_context: JsLoaderContext,
) -> Result<JsLoaderContext> {
run_builtin(builtin, options, loader_context).await
run_builtin(builtin, options.as_deref(), loader_context).await
}

0 comments on commit 591f55d

Please sign in to comment.