File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,6 @@ native mod rustrt {
106
106
fn str_reserve_shared ( & ss: str , nn : libc:: size_t ) ;
107
107
}
108
108
109
- // FIXME: add pure to a lot of functions
110
-
111
109
/*
112
110
Section: Creating a string
113
111
*/
Original file line number Diff line number Diff line change @@ -94,9 +94,7 @@ type init_op<T> = fn(uint) -> T;
94
94
95
95
#[ doc = "Returns true if a vector contains no elements" ]
96
96
pure fn is_empty < T > ( v : [ const T ] ) -> bool {
97
- // FIXME: This would be easier if we could just call len
98
- for t: T in v { ret false ; }
99
- ret true;
97
+ len ( v) == 0 u
100
98
}
101
99
102
100
#[ doc = "Returns true if a vector contains some elements" ]
@@ -154,8 +152,6 @@ fn from_elem<T: copy>(n_elts: uint, t: T) -> [T] {
154
152
ret v;
155
153
}
156
154
157
- // FIXME: Possible typestate postcondition:
158
- // len(result) == len(v) (needs issue #586)
159
155
#[ doc = "Produces a mutable vector from an immutable vector." ]
160
156
fn to_mut < T > ( +v : [ T ] ) -> [ mutable T ] unsafe {
161
157
let r = :: unsafe:: reinterpret_cast ( v) ;
@@ -185,9 +181,6 @@ fn tailn<T: copy>(v: [const T], n: uint) -> [T] {
185
181
slice ( v, n, len ( v) )
186
182
}
187
183
188
- // FIXME: This name is sort of confusing next to from_fn, etc
189
- // but this is the name haskell uses for this function,
190
- // along with head/tail/last.
191
184
#[ doc = "Returns all but the last elemnt of a vector" ]
192
185
fn init < T : copy > ( v : [ const T ] ) -> [ T ] {
193
186
assert len( v) != 0 u;
You can’t perform that action at this time.
0 commit comments