Skip to content

Commit

Permalink
Add UTF-8 conversion to fix wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
pyamada-atlassian committed Aug 1, 2024
1 parent 680bd32 commit ea53fd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/node-resolver-rs/src/url_to_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn url_to_path(input: &str) -> Result<PathBuf, SpecifierError> {
#[cfg(any(target_arch = "wasm32", test))]
#[inline]
fn os_str_from_bytes(slice: &[u8]) -> &OsStr {
OsStr::new(slice)
OsStr::new(std::str::from_utf8(slice).expect("Non UTF-8 string"))
}

#[cfg(test)]
Expand Down

0 comments on commit ea53fd9

Please sign in to comment.