mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 19:17:12 +00:00
Deduplicate code in proc-macro-srv
This commit is contained in:
parent
2dc5aa885a
commit
02a788bfaa
6 changed files with 160 additions and 297 deletions
|
|
@ -431,12 +431,6 @@ impl CargoWorkspace {
|
|||
.ok_or(cargo_metadata::Error::NoJson)?;
|
||||
Ok((cargo_metadata::MetadataCommand::parse(stdout)?, None))
|
||||
})()
|
||||
.map(|(metadata, error)| {
|
||||
(
|
||||
metadata,
|
||||
error.map(|e| e.context(format!("Failed to run `{:?}`", meta.cargo_command()))),
|
||||
)
|
||||
})
|
||||
.with_context(|| format!("Failed to run `{:?}`", meta.cargo_command()))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue