Get rid of mostly unused Justfile.recipes() (#98)
This commit is contained in:
parent
1856646a9c
commit
5b2d671c1d
@ -199,7 +199,7 @@ pub fn app() {
|
|||||||
if justfile.count() == 0 {
|
if justfile.count() == 0 {
|
||||||
warn!("Justfile contains no recipes.");
|
warn!("Justfile contains no recipes.");
|
||||||
} else {
|
} else {
|
||||||
println!("{}", justfile.recipes().join(" "));
|
println!("{}", justfile.recipes.keys().cloned().collect::<Vec<_>>().join(" "));
|
||||||
}
|
}
|
||||||
process::exit(0);
|
process::exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1062,10 +1062,6 @@ impl<'a, 'b> Justfile<'a> where 'a: 'b {
|
|||||||
self.recipes.len()
|
self.recipes.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn recipes(&self) -> Vec<&'a str> {
|
|
||||||
self.recipes.keys().cloned().collect()
|
|
||||||
}
|
|
||||||
|
|
||||||
fn suggest(&self, name: &str) -> Option<&'a str> {
|
fn suggest(&self, name: &str) -> Option<&'a str> {
|
||||||
let mut suggestions = self.recipes.keys()
|
let mut suggestions = self.recipes.keys()
|
||||||
.map(|suggestion| (edit_distance::edit_distance(suggestion, name), suggestion))
|
.map(|suggestion| (edit_distance::edit_distance(suggestion, name), suggestion))
|
||||||
|
Loading…
Reference in New Issue
Block a user