We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2cd1e3 commit f7d35d9Copy full SHA for f7d35d9
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 8c4f1652ec4dc42d6012d01d7cd31a2181eff965
+refs/heads/master: f010f79a6164beab6a3cf920d325b2fb854e1b49
trunk/src/lib/ivec.rs
@@ -72,6 +72,22 @@ fn init_elt_mut[T](&T t, uint n_elts) -> T[mutable] {
72
ret v;
73
}
74
75
+fn to_mut[T](&T[] v) -> T[mutable] {
76
+ auto vres = ~[mutable];
77
+ for (T t in v) {
78
+ vres += ~[mutable t];
79
+ }
80
+ ret vres;
81
+}
82
+
83
+fn from_mut[T](&T[mutable] v) -> T[] {
84
+ auto vres = ~[];
85
86
+ vres += ~[t];
87
88
89
90
91
// Predicates
92
pred is_empty[T](&T[mutable?] v) -> bool {
93
// FIXME: This would be easier if we could just call len
0 commit comments