Skip to content

Commit 5dc8045

Browse files
committed
address simple review comments
1 parent 420a0b1 commit 5dc8045

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/ra_project_model/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ ra_cfg = { path = "../ra_cfg" }
2020
serde = { version = "1.0.89", features = ["derive"] }
2121
serde_json = "1.0.39"
2222

23-
anyhow = "1.0.26"
23+
anyhow = "1.0.26"

crates/ra_project_model/src/sysroot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! FIXME: write short doc here
22
3-
use anyhow::{anyhow, Result};
3+
use anyhow::{anyhow, bail, Context, Result};
44
use std::{
55
env,
66
path::{Path, PathBuf},
@@ -99,7 +99,7 @@ fn try_find_src_path(cargo_toml: &Path) -> Result<PathBuf> {
9999
.current_dir(cargo_toml.parent().unwrap())
100100
.args(&["--print", "sysroot"])
101101
.output()
102-
.map_err(|e| anyhow!("rustc --print sysroot failed: {}", e))?;
102+
.context("rustc --print sysroot failed")?;
103103
if !rustc_output.status.success() {
104104
let exit_message = match rustc_output.status.code() {
105105
Some(code) => {

0 commit comments

Comments
 (0)