Skip to content

Commit 994601e

Browse files
committed
Call to iterator methods are not strictly needed anymore.
1 parent d0c3895 commit 994601e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let mut person = Person {
2424
last_name: "Lovelace".into()
2525
};
2626

27-
for name in person.get_names().into_iter() {
27+
for name in person.get_names() {
2828
*name = name.to_lowercase();
2929
}
3030

example/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn to_lowercase() {
4141
last_name: "LoVElaCE".into(),
4242
};
4343

44-
for name in person.get_names().into_iter() {
44+
for name in person.get_names() {
4545
*name = name.to_lowercase();
4646
}
4747

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! last_name: "Lovelace".into()
2121
//! };
2222
//!
23-
//! for name in person.get_names().into_iter() {
23+
//! for name in person.get_names() {
2424
//! *name = name.to_lowercase();
2525
//! }
2626
//!
@@ -282,7 +282,7 @@ const IMPLICIT_SELECT_ALL_NAME: &str = "implicit_select_all";
282282
/// c: Some(String::from("bar"))
283283
/// };
284284
///
285-
/// for option in many.ephemeral_options().into_iter() {
285+
/// for option in many.ephemeral_options() {
286286
/// option.set_none();
287287
/// }
288288
///

0 commit comments

Comments
 (0)