We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
iris.rs
1 parent 1c12851 commit 3024f95Copy full SHA for 3024f95
examples/iris.rs
@@ -77,15 +77,15 @@ fn main() {
77
let mut plot_symbols = "+ox".chars().cycle();
78
let mut symbolmap = HashMap::new();
79
80
- // using Itertools::group_by
81
- for (species, species_group) in &irises.iter().group_by(|iris| &iris.name) {
+ // using Itertools::chunk_by
+ for (species, species_chunk) in &irises.iter().chunk_by(|iris| &iris.name) {
82
// assign a plot symbol
83
symbolmap
84
.entry(species)
85
.or_insert_with(|| plot_symbols.next().unwrap());
86
println!("{} (symbol={})", species, symbolmap[species]);
87
88
- for iris in species_group {
+ for iris in species_chunk {
89
// using Itertools::format for lazy formatting
90
println!("{:>3.1}", iris.data.iter().format(", "));
91
}
0 commit comments