mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
Force / slashes on windows
This commit is contained in:
parent
7e3ee77c83
commit
13a996f3b6
1 changed files with 3 additions and 2 deletions
|
@ -70,14 +70,15 @@ fn is_valid_feature_name(feature: &str) -> bool {
|
|||
impl fmt::Display for Feature {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
writeln!(f, "=== {}", self.id)?;
|
||||
let path = self.path.strip_prefix(&project_root()).unwrap();
|
||||
let path = self.path.strip_prefix(&project_root()).unwrap().display().to_string();
|
||||
let path = path.replace('\\', "/");
|
||||
let name = self.path.file_name().unwrap();
|
||||
|
||||
//FIXME: generate line number as well
|
||||
writeln!(
|
||||
f,
|
||||
"**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/{}[{}]",
|
||||
path.display(),
|
||||
path,
|
||||
name.to_str().unwrap(),
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue