mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Adding crate_root_path to crate_graph
This commit is contained in:
parent
8e687f7afb
commit
a3081a6774
10 changed files with 74 additions and 37 deletions
|
@ -213,6 +213,13 @@ impl AbsPath {
|
|||
pub fn exists(&self) -> bool {
|
||||
self.0.exists()
|
||||
}
|
||||
|
||||
pub fn name_and_extension(&self) -> Option<(&str, Option<&str>)> {
|
||||
Some((
|
||||
self.file_stem()?.to_str()?,
|
||||
self.extension().and_then(|extension| extension.to_str()),
|
||||
))
|
||||
}
|
||||
// endregion:delegate-methods
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue