mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 20:58:28 +00:00
Use strip_prefix instead of replacen
This commit is contained in:
@@ -1236,11 +1236,7 @@ fn link_exe_from_dir(
|
||||
}
|
||||
|
||||
pub(crate) fn normalize_path(s: &str) -> String {
|
||||
if s.starts_with("\\\\?\\") {
|
||||
s.replacen("\\\\?\\", "", 1)
|
||||
} else {
|
||||
s.to_string()
|
||||
}
|
||||
s.strip_prefix(r"\\?\").unwrap_or(s).to_string()
|
||||
}
|
||||
|
||||
/// Link compiled objects using the system linker
|
||||
|
||||
Reference in New Issue
Block a user