stdlib: Remove exterior vectors from termivec

This commit is contained in:
Patrick Walton 2011-07-12 13:58:48 -07:00
parent f7a1006a07
commit 043096ea0a

View File

@ -48,10 +48,15 @@ fn reset(ioivec::buf_writer writer) {
}
fn color_supported() -> bool {
auto supported_terms = ["xterm-color", "xterm", "screen-bce"];
auto supported_terms = ~["xterm-color", "xterm", "screen-bce"];
ret alt (generic_os::getenv("TERM")) {
case (option::some(?env)) { vec::member(env, supported_terms) }
case (option::none) { false }
case (option::some(?env)) {
for (str term in supported_terms) {
if (str::eq(term, env)) { true }
}
false
}
case (option::none) { false }
};
}