mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
simplify runnables
This commit is contained in:
parent
ef08b6c084
commit
28f6eedba5
7 changed files with 65 additions and 124 deletions
|
@ -80,7 +80,7 @@ impl Module {
|
|||
Some(Crate::new(crate_id))
|
||||
}
|
||||
|
||||
/// Returns the all modulkes on the way to the root.
|
||||
/// Returns the all modules on the way to the root.
|
||||
pub fn path_to_root(&self) -> Vec<Module> {
|
||||
generate(Some(self.clone()), move |it| it.parent()).collect::<Vec<Module>>()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue