We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cb43b8 commit 38f761bCopy full SHA for 38f761b
bootstrap/src/main.rs
@@ -18,7 +18,10 @@ fn main() {
18
19
// workaround for Windows
20
// TODO: use `normpath` or a different workaround on Windows?
21
- let normalized_path = pest.to_string_lossy().to_string().replace(r#"\\?\"#, "");
+ let pest_ref = pest.to_string_lossy();
22
+ let normalized_path = pest_ref
23
+ .strip_prefix(r#"\\?\"#)
24
+ .unwrap_or_else(|| &pest_ref);
25
let pest = Path::new(&normalized_path);
26
27
// Path on which we should write generated grammar file.
0 commit comments