Skip to content

Commit 7281166

Browse files
committed
Use find_equiv in term
1 parent cf64324 commit 7281166

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libextra/term.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ pub impl Terminal {
7070

7171
let mut inf = ti.get();
7272
let cs = *inf.numbers.find_or_insert(~"colors", 0) >= 16 && inf.strings.find(&~"setaf").is_some()
73-
&& inf.strings.find(&~"setab").is_some();
73+
&& inf.strings.find_equiv(&("setab")).is_some();
7474

7575
return Ok(Terminal {out: out, ti: inf, color_supported: cs});
7676
}
7777
fn fg(&self, color: u8) {
78-
self.out.write(expand(*self.ti.strings.find(&~"setaf").unwrap(), [Number(color as int)], [], []));
78+
self.out.write(expand(*self.ti.strings.find_equiv(&("setaf")).unwrap(), [Number(color as int)], [], []));
7979
}
8080
fn bg(&self, color: u8) {
81-
self.out.write(expand(*self.ti.strings.find(&~"setab").unwrap(), [Number(color as int)], [], []));
81+
self.out.write(expand(*self.ti.strings.find_equiv(&("setab")).unwrap(), [Number(color as int)], [], []));
8282
}
8383
fn reset(&self) {
84-
self.out.write(expand(*self.ti.strings.find(&~"op").unwrap(), [], [], []));
84+
self.out.write(expand(*self.ti.strings.find_equiv(&("op")).unwrap(), [], [], []));
8585
}
8686
}

0 commit comments

Comments
 (0)