mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
stdlib: Remove exterior vectors from termivec
This commit is contained in:
parent
f7a1006a07
commit
043096ea0a
@ -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 }
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user