Browse Source

list sorted

db-refactoring
Coin de Gamma 4 months ago
parent
commit
701def6089
  1. 4
      src/main.rs

4
src/main.rs

@ -94,7 +94,9 @@ fn add(id: &String) -> io::Result<()> {
fn list() -> io:: Result<()> { fn list() -> io:: Result<()> {
let db = read_db()?; let db = read_db()?;
for item in db.iter() { let mut vec: Vec<_> = db.iter().collect();
vec.sort();
for item in &vec {
println!("{}", item); println!("{}", item);
} }
Ok(()) Ok(())

Loading…
Cancel
Save