about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-05-14 15:28:48 -0700
committerEric Holk <eric.holk@gmail.com>2012-05-14 16:55:40 -0700
commit97aba0b14f965059a18f8e5ef8138dcfd5fe6293 (patch)
treeda843804d0ec9782e22d6debfcc3b6d1efcb12b2 /src/libcore
parentd899c3a5792da29ac2bf71caf76b56017b5f42d0 (diff)
downloadrust-97aba0b14f965059a18f8e5ef8138dcfd5fe6293.tar.gz
rust-97aba0b14f965059a18f8e5ef8138dcfd5fe6293.zip
Adding more documentation to vec::each and vec::eachi to better explain the breaking protocol.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/vec.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index 7a316507912..d083bcae679 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -820,6 +820,8 @@ fn iter_between<T>(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<T>(v: [const T]/&, f: fn(T) -> bool) unsafe {
@@ -836,6 +838,8 @@ fn each<T>(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<T>(v: [const T]/&, f: fn(uint, T) -> bool) unsafe {