libcore: update bytes/str reader to work with regions.

This optimizes away a copy.
This commit is contained in:
Erick Tryzelaar 2012-08-21 18:32:23 -07:00
parent 6b6bea9531
commit bf0ea66dac
3 changed files with 37 additions and 50 deletions

View file

@ -69,7 +69,7 @@ mod test {
#[test]
fn read_simple_board() {
let s = #include_str("./maps/contest1.map");
read_board_grid(io::str_reader(s));
io::with_str_reader(s, read_board_grid)
}
}