mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
internal: Remove AbsPathBuf::TryFrom impl that checks too many things at once
This commit is contained in:
parent
670a5ab4a9
commit
758ad25229
15 changed files with 90 additions and 95 deletions
|
@ -37,7 +37,7 @@ use std::{
|
|||
};
|
||||
|
||||
use anyhow::{bail, format_err, Context};
|
||||
use paths::{AbsPath, AbsPathBuf};
|
||||
use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
pub use crate::{
|
||||
|
@ -132,8 +132,11 @@ impl ProjectManifest {
|
|||
.filter_map(Result::ok)
|
||||
.map(|it| it.path().join("Cargo.toml"))
|
||||
.filter(|it| it.exists())
|
||||
.map(Utf8PathBuf::from_path_buf)
|
||||
.filter_map(Result::ok)
|
||||
.map(AbsPathBuf::try_from)
|
||||
.filter_map(|it| it.ok()?.try_into().ok())
|
||||
.filter_map(Result::ok)
|
||||
.filter_map(|it| it.try_into().ok())
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue