Format list.
This commit is contained in:
		@@ -108,12 +108,25 @@ impl HabitMgr
 | 
				
			|||||||
		println!("Removed habit {}", old_habit.get_name());
 | 
							println!("Removed habit {}", old_habit.get_name());
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pub fn list(&mut self, all:bool, verbose:bool)
 | 
						pub fn list(&mut self, _all:bool, _verbose:bool)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		self.import_habits();
 | 
							self.import_habits();
 | 
				
			||||||
		for (i, habit) in self.habits.iter().enumerate()
 | 
							if self.habits.is_empty()
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			println!("{}\t{}", i, habit.get_name());
 | 
								println!("There are no habits. Add one!");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								println!(" {0: <3} | {1: <5} | {2: <6} | {3}",
 | 
				
			||||||
 | 
												 "id", "bad", "weight", "name");
 | 
				
			||||||
 | 
								for (i, habit) in self.habits.iter().enumerate()
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									println!(" {0: <3} | {1: <5} | {2: <6} | {3}",
 | 
				
			||||||
 | 
													 i,
 | 
				
			||||||
 | 
													 habit.get_bad(),
 | 
				
			||||||
 | 
													 habit.get_weight(),
 | 
				
			||||||
 | 
													 habit.get_name());
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user