Skip to content

Commit 91ea257

Browse files
committed
Remove a few more istr conversions. Issue #855
1 parent 7924368 commit 91ea257

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/lib/test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,23 @@ fn run_tests_console_(opts: &test_opts, tests: &[test_desc],
183183
ret success;
184184

185185
fn write_ok(out: &io::writer, use_color: bool) {
186-
write_pretty(out, "ok", term::color_green, use_color);
186+
write_pretty(out, ~"ok", term::color_green, use_color);
187187
}
188188

189189
fn write_failed(out: &io::writer, use_color: bool) {
190-
write_pretty(out, "FAILED", term::color_red, use_color);
190+
write_pretty(out, ~"FAILED", term::color_red, use_color);
191191
}
192192

193193
fn write_ignored(out: &io::writer, use_color: bool) {
194-
write_pretty(out, "ignored", term::color_yellow, use_color);
194+
write_pretty(out, ~"ignored", term::color_yellow, use_color);
195195
}
196196

197-
fn write_pretty(out: &io::writer, word: &str, color: u8,
197+
fn write_pretty(out: &io::writer, word: &istr, color: u8,
198198
use_color: bool) {
199199
if use_color && term::color_supported() {
200200
term::fg(out.get_buf_writer(), color);
201201
}
202-
out.write_str(istr::from_estr(word));
202+
out.write_str(word);
203203
if use_color && term::color_supported() {
204204
term::reset(out.get_buf_writer());
205205
}

src/test/compiletest/compiletest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ fn str_opt(maybestr: &istr) -> option::t<istr> {
100100
}
101101

102102
fn str_mode(s: &istr) -> mode {
103-
alt istr::to_estr(s) {
104-
"compile-fail" { mode_compile_fail }
105-
"run-fail" { mode_run_fail }
106-
"run-pass" { mode_run_pass }
107-
"pretty" { mode_pretty }
103+
alt s {
104+
~"compile-fail" { mode_compile_fail }
105+
~"run-fail" { mode_run_fail }
106+
~"run-pass" { mode_run_pass }
107+
~"pretty" { mode_pretty }
108108
_ { fail "invalid mode" }
109109
}
110110
}

0 commit comments

Comments
 (0)