We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d77f8d5 + ba2a3e8 commit 10e8ae8Copy full SHA for 10e8ae8
src/libcore/at_vec.rs
@@ -154,7 +154,7 @@ pub pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
154
* Creates and initializes an immutable managed vector by moving all the
155
* elements from an owned vector.
156
*/
157
-fn from_owned<T>(v: ~[T]) -> @[T] {
+pub fn from_owned<T>(v: ~[T]) -> @[T] {
158
let mut av = @[];
159
unsafe {
160
raw::reserve(&mut av, v.len());
@@ -169,7 +169,7 @@ fn from_owned<T>(v: ~[T]) -> @[T] {
169
* Creates and initializes an immutable managed vector by copying all the
170
* elements of a slice.
171
172
-fn from_slice<T:Copy>(v: &[T]) -> @[T] {
+pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
173
from_fn(v.len(), |i| v[i])
174
}
175
0 commit comments