Small file error display fix

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Kirill Bulatov 2021-05-24 14:47:20 +03:00 committed by GitHub
parent b5f524c7ff
commit d8c36029cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ impl Sysroot {
pub fn discover(cargo_toml: &AbsPath) -> Result<Sysroot> { pub fn discover(cargo_toml: &AbsPath) -> Result<Sysroot> {
log::debug!("Discovering sysroot for {}", cargo_toml.display()); log::debug!("Discovering sysroot for {}", cargo_toml.display());
let current_dir = cargo_toml.parent().ok_or_else(|| { let current_dir = cargo_toml.parent().ok_or_else(|| {
format_err!("Failed to find the parent directory for file {:?}", cargo_toml) format_err!("Failed to find the parent directory for {}", cargo_toml.display())
})?; })?;
let sysroot_dir = discover_sysroot_dir(current_dir)?; let sysroot_dir = discover_sysroot_dir(current_dir)?;
let sysroot_src_dir = discover_sysroot_src_dir(&sysroot_dir, current_dir)?; let sysroot_src_dir = discover_sysroot_src_dir(&sysroot_dir, current_dir)?;