mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
internal: Enforce utf8 paths
This commit is contained in:
parent
ba339596bf
commit
399dbc074b
46 changed files with 383 additions and 319 deletions
|
@ -326,7 +326,7 @@ impl VirtualPath {
|
|||
}
|
||||
|
||||
fn strip_prefix(&self, base: &VirtualPath) -> Option<&RelPath> {
|
||||
<_ as AsRef<std::path::Path>>::as_ref(&self.0)
|
||||
<_ as AsRef<paths::Utf8Path>>::as_ref(&self.0)
|
||||
.strip_prefix(&base.0)
|
||||
.ok()
|
||||
.map(RelPath::new_unchecked)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue