Skip to content

Commit 3445454

Browse files
committed
core: Resolve and remove some FIXMEs
1 parent 9e9f4a6 commit 3445454

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/libcore/str.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ native mod rustrt {
106106
fn str_reserve_shared(&ss: str, nn: libc::size_t);
107107
}
108108

109-
// FIXME: add pure to a lot of functions
110-
111109
/*
112110
Section: Creating a string
113111
*/

src/libcore/vec.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ type init_op<T> = fn(uint) -> T;
9494

9595
#[doc = "Returns true if a vector contains no elements"]
9696
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) == 0u
10098
}
10199

102100
#[doc = "Returns true if a vector contains some elements"]
@@ -154,8 +152,6 @@ fn from_elem<T: copy>(n_elts: uint, t: T) -> [T] {
154152
ret v;
155153
}
156154

157-
// FIXME: Possible typestate postcondition:
158-
// len(result) == len(v) (needs issue #586)
159155
#[doc = "Produces a mutable vector from an immutable vector."]
160156
fn to_mut<T>(+v: [T]) -> [mutable T] unsafe {
161157
let r = ::unsafe::reinterpret_cast(v);
@@ -185,9 +181,6 @@ fn tailn<T: copy>(v: [const T], n: uint) -> [T] {
185181
slice(v, n, len(v))
186182
}
187183

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.
191184
#[doc = "Returns all but the last elemnt of a vector"]
192185
fn init<T: copy>(v: [const T]) -> [T] {
193186
assert len(v) != 0u;

0 commit comments

Comments
 (0)