Skip to content

Commit 973304d

Browse files
committed
---
yaml --- r: 81741 b: refs/heads/master c: d3e6889 h: refs/heads/master i: 81739: 8a15cbc v: v3
1 parent 0a4381f commit 973304d

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 650100dfbf1207e8369446ecdf949dbdf25eb34b
2+
refs/heads/master: d3e6889060a7a1d9057c4b284cc753929e7ab605
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/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)