mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
internal: use consistent style for error handling
This commit is contained in:
parent
49318bbae7
commit
6303551cb8
22 changed files with 128 additions and 134 deletions
|
@ -1,7 +1,6 @@
|
|||
//! Runs `rustc --print target-spec-json` to get the target_data_layout.
|
||||
use std::process::Command;
|
||||
|
||||
use anyhow::Result;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use crate::{utf8_stdout, ManifestPath};
|
||||
|
@ -10,7 +9,7 @@ pub fn get(
|
|||
cargo_toml: Option<&ManifestPath>,
|
||||
target: Option<&str>,
|
||||
extra_env: &FxHashMap<String, String>,
|
||||
) -> Result<String> {
|
||||
) -> anyhow::Result<String> {
|
||||
let output = (|| {
|
||||
if let Some(cargo_toml) = cargo_toml {
|
||||
let mut cmd = Command::new(toolchain::rustc());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue