mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Merge branch 'main' of github.com:zaphar/kitchen into main
This commit is contained in:
commit
5462912014
@ -87,7 +87,7 @@ pub fn output_ingredients_list(rs: Vec<Recipe>) {
|
|||||||
acc.accumulate_from(&r);
|
acc.accumulate_from(&r);
|
||||||
}
|
}
|
||||||
for (_, i) in acc.ingredients() {
|
for (_, i) in acc.ingredients() {
|
||||||
print!("{}", i.amt);
|
print!("{}", i.amt.normalize());
|
||||||
println!(" {}", i.name);
|
println!(" {}", i.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ pub fn output_ingredients_csv(rs: Vec<Recipe>) {
|
|||||||
let mut writer = csv::Writer::from_writer(out);
|
let mut writer = csv::Writer::from_writer(out);
|
||||||
for (_, i) in acc.ingredients() {
|
for (_, i) in acc.ingredients() {
|
||||||
writer
|
writer
|
||||||
.write_record(&[format!("{}", i.amt), i.name])
|
.write_record(&[format!("{}", i.amt.normalize()), i.name])
|
||||||
.expect("Failed to write csv.");
|
.expect("Failed to write csv.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user