Skip to content

Commit 15fe9d2

Browse files
committed
---
yaml --- r: 83303 b: refs/heads/try c: d3e6889 h: refs/heads/master i: 83301: bc09522 83299: ca0ff07 83295: b0e8f86 v: v3
1 parent e079075 commit 15fe9d2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: 650100dfbf1207e8369446ecdf949dbdf25eb34b
5+
refs/heads/try: d3e6889060a7a1d9057c4b284cc753929e7ab605
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libstd/vec.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
925925
}
926926

927927
#[inline]
928+
/// Returns an iterator over the vector
928929
fn iter(self) -> VecIterator<'self, T> {
929930
unsafe {
930931
let p = vec::raw::to_ptr(self);
@@ -941,6 +942,7 @@ impl<'self,T> ImmutableVector<'self, T> for &'self [T] {
941942
}
942943

943944
#[inline]
945+
/// Returns a reversed iterator over a vector
944946
fn rev_iter(self) -> RevIterator<'self, T> {
945947
self.iter().invert()
946948
}
@@ -1931,6 +1933,7 @@ impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
19311933
}
19321934

19331935
#[inline]
1936+
/// Returns an iterator that allows modifying each value
19341937
fn mut_iter(self) -> VecMutIterator<'self, T> {
19351938
unsafe {
19361939
let p = vec::raw::to_mut_ptr(self);
@@ -1947,6 +1950,7 @@ impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
19471950
}
19481951

19491952
#[inline]
1953+
/// Returns a reversed iterator that allows modifying each value
19501954
fn mut_rev_iter(self) -> MutRevIterator<'self, T> {
19511955
self.mut_iter().invert()
19521956
}
@@ -1988,11 +1992,13 @@ impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
19881992
}
19891993

19901994
#[inline]
1995+
/// Returns an unsafe mutable pointer to the element in index
19911996
unsafe fn unsafe_mut_ref(self, index: uint) -> *mut T {
19921997
ptr::mut_offset(self.repr().data as *mut T, index as int)
19931998
}
19941999

19952000
#[inline]
2001+
/// Unsafely sets the element in index to the value
19962002
unsafe fn unsafe_set(self, index: uint, val: T) {
19972003
*self.unsafe_mut_ref(index) = val;
19982004
}

0 commit comments

Comments
 (0)