mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: ensure that ws loading error includes path to ws
This commit is contained in:
parent
00b9d9faf4
commit
49318bbae7
4 changed files with 30 additions and 2 deletions
|
@ -31,6 +31,7 @@ pub mod target_data_layout;
|
|||
mod tests;
|
||||
|
||||
use std::{
|
||||
fmt,
|
||||
fs::{self, read_dir, ReadDir},
|
||||
io,
|
||||
process::Command,
|
||||
|
@ -145,6 +146,16 @@ impl ProjectManifest {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ProjectManifest {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
ProjectManifest::ProjectJson(it) | ProjectManifest::CargoToml(it) => {
|
||||
fmt::Display::fmt(&it, f)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn utf8_stdout(mut cmd: Command) -> Result<String> {
|
||||
let output = cmd.output().with_context(|| format!("{cmd:?} failed"))?;
|
||||
if !output.status.success() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue