core Remove vec::enum_chars/uint. Closes #1955
This commit is contained in:
parent
a5368fb6d8
commit
6d4fb35912
@ -58,8 +58,6 @@
|
||||
export swap;
|
||||
export reverse;
|
||||
export reversed;
|
||||
export enum_chars;
|
||||
export enum_uints;
|
||||
export iter;
|
||||
export iter2;
|
||||
export iteri;
|
||||
@ -734,26 +732,6 @@ fn reversed<T: copy>(v: [const T]) -> [T] {
|
||||
ret rs;
|
||||
}
|
||||
|
||||
// FIXME: Seems like this should take char params. Maybe belongs in char
|
||||
#[doc = "Returns a vector containing a range of chars"]
|
||||
fn enum_chars(start: u8, end: u8) -> [char] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i as char]; i += 1u as u8; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
// FIXME: Probably belongs in uint. Compare to uint::range
|
||||
#[doc = "Returns a vector containing a range of uints"]
|
||||
fn enum_uints(start: uint, end: uint) -> [uint] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i]; i += 1u; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
#[doc = "
|
||||
Iterates over a vector
|
||||
|
||||
|
@ -6,6 +6,22 @@
|
||||
import u8;
|
||||
import vec::*;
|
||||
|
||||
fn enum_chars(start: u8, end: u8) -> [char] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i as char]; i += 1u as u8; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
fn enum_uints(start: uint, end: uint) -> [uint] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i]; i += 1u; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a = 'a' as u8, j = 'j' as u8, k = 1u, l = 9u;
|
||||
// Silly, but necessary
|
||||
|
@ -6,6 +6,22 @@
|
||||
|
||||
import vec::*;
|
||||
|
||||
fn enum_chars(start: u8, end: u8) -> [char] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i as char]; i += 1u as u8; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
fn enum_uints(start: uint, end: uint) -> [uint] {
|
||||
assert start < end;
|
||||
let mut i = start;
|
||||
let mut r = [];
|
||||
while i <= end { r += [i]; i += 1u; }
|
||||
ret r;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a = 'a' as u8, j = 'j' as u8, k = 1u, l = 10u;
|
||||
// Silly, but necessary
|
||||
|
Loading…
Reference in New Issue
Block a user