fixed readme out of bounds

This commit is contained in:
Rémi CORNIERE 2021-04-09 22:42:59 +02:00 committed by Mingwei Samuel
parent 7bbe5fc3aa
commit a97bceb827

View file

@ -50,7 +50,7 @@ rt.block_on(async {
.expect("Get champion masteries failed.");
// Print champioon masteries.
for (i, mastery) in masteries[..10].iter().enumerate() {
for (i, mastery) in masteries.iter().take(10).enumerate() {
println!("{: >2}) {: <9} {: >7} ({})", i + 1,
mastery.champion_id.to_string(),
mastery.champion_points, mastery.champion_level);