From 0f23bbac0104fe4c51923eb09b7a98c3e6239571 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 6 May 2011 16:30:39 -0700 Subject: Fix GenericOS.getenv returning a raw str, return an Option.t[str] instead. --- src/lib/Term.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/Term.rs') diff --git a/src/lib/Term.rs b/src/lib/Term.rs index fca04bff..b07dcc0c 100644 --- a/src/lib/Term.rs +++ b/src/lib/Term.rs @@ -31,7 +31,7 @@ fn reset(IO.buf_writer writer) { } fn color_supported() -> bool { - ret Str.eq(GenericOS.getenv("TERM"), "xterm-color"); + ret GenericOS.getenv("TERM") == Option.some[str]("xterm-color"); } fn set_color(IO.buf_writer writer, u8 first_char, u8 color) { -- cgit v1.2.3