From bb9552ef00a986a6aed947b0399a1b620b74e096 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Thu, 12 Jun 2014 05:35:02 -0400 Subject: [PATCH] libgetopts: Use iterators instead of old-style loops. --- src/libgetopts/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index bb3e90958f14..23f16be1659f 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -896,7 +896,7 @@ fn each_split_within<'a>(ss: &'a str, lim: uint, it: |&'a str| -> bool) *cont }; - ss.char_indices().advance(|x| machine(&mut cont, x)); + ss.char_indices().all(|x| machine(&mut cont, x)); // Let the automaton 'run out' by supplying trailing whitespace while cont && match state { B | C => true, A => false } {