From 97aba0b14f965059a18f8e5ef8138dcfd5fe6293 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Mon, 14 May 2012 15:28:48 -0700 Subject: [PATCH] Adding more documentation to vec::each and vec::eachi to better explain the breaking protocol. --- src/libcore/vec.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 7a316507912f..d083bcae6792 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -820,6 +820,8 @@ fn iter_between(v: [const T], start: uint, end: uint, f: fn(T)) { #[doc = " Iterates over a vector, with option to break + +Return true to continue, false to break. "] #[inline(always)] fn each(v: [const T]/&, f: fn(T) -> bool) unsafe { @@ -836,6 +838,8 @@ fn each(v: [const T]/&, f: fn(T) -> bool) unsafe { #[doc = " Iterates over a vector's elements and indices + +Return true to continue, false to break. "] #[inline(always)] fn eachi(v: [const T]/&, f: fn(uint, T) -> bool) unsafe {