diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 224b52aa695a..c8e32bb41382 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -106,8 +106,6 @@ native mod rustrt { fn str_reserve_shared(&ss: str, nn: libc::size_t); } -// FIXME: add pure to a lot of functions - /* Section: Creating a string */ diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index c7955413975d..d69507b75c18 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -94,9 +94,7 @@ type init_op = fn(uint) -> T; #[doc = "Returns true if a vector contains no elements"] pure fn is_empty(v: [const T]) -> bool { - // FIXME: This would be easier if we could just call len - for t: T in v { ret false; } - ret true; + len(v) == 0u } #[doc = "Returns true if a vector contains some elements"] @@ -154,8 +152,6 @@ fn from_elem(n_elts: uint, t: T) -> [T] { ret v; } -// FIXME: Possible typestate postcondition: -// len(result) == len(v) (needs issue #586) #[doc = "Produces a mutable vector from an immutable vector."] fn to_mut(+v: [T]) -> [mutable T] unsafe { let r = ::unsafe::reinterpret_cast(v); @@ -185,9 +181,6 @@ fn tailn(v: [const T], n: uint) -> [T] { slice(v, n, len(v)) } -// FIXME: This name is sort of confusing next to from_fn, etc -// but this is the name haskell uses for this function, -// along with head/tail/last. #[doc = "Returns all but the last elemnt of a vector"] fn init(v: [const T]) -> [T] { assert len(v) != 0u;