Enumerate habits in list subcommand.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-07-13 10:32:41 +02:00
parent 6961e4e3f3
commit b5f4c3bb13

View File

@ -88,9 +88,9 @@ impl HabitMgr
pub fn list(&mut self, all:bool, verbose:bool)
{
self.import_habits();
for i in &self.habits
for (i, habit) in self.habits.iter().enumerate()
{
println!("{}", i.get_name());
println!("{}\t{}", i, habit.get_name());
}
}
}