Skip to content

Commit 84e97d5

Browse files
committed
I modified the doc of from_elem, from_fn, I think it returns an owned vector
1 parent 84e22f2 commit 84e97d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/vec.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ pub fn uniq_len<T>(v: &const ~[T]) -> uint {
137137
}
138138

139139
/**
140-
* Creates and initializes an immutable vector.
140+
* Creates and initializes an owned vector.
141141
*
142-
* Creates an immutable vector of size `n_elts` and initializes the elements
142+
* Creates an owned vector of size `n_elts` and initializes the elements
143143
* to the value returned by the function `op`.
144144
*/
145145
pub fn from_fn<T>(n_elts: uint, op: old_iter::InitOp<T>) -> ~[T] {
@@ -159,9 +159,9 @@ pub fn from_fn<T>(n_elts: uint, op: old_iter::InitOp<T>) -> ~[T] {
159159
}
160160

161161
/**
162-
* Creates and initializes an immutable vector.
162+
* Creates and initializes an owned vector.
163163
*
164-
* Creates an immutable vector of size `n_elts` and initializes the elements
164+
* Creates an owned vector of size `n_elts` and initializes the elements
165165
* to the value `t`.
166166
*/
167167
pub fn from_elem<T:Copy>(n_elts: uint, t: T) -> ~[T] {

0 commit comments

Comments
 (0)