From 62651df2b482af4dc98b0aec6c5f1ad112fab8ec Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 7 Mar 2013 23:44:38 -0500 Subject: Fix dvec-related fallout in tests --- src/libsyntax/parse/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 48d3fbe8889..a1fc7230dd1 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -303,9 +303,9 @@ mod test { use util::testing::*; #[test] fn to_json_str (val: Encodable) -> ~str { - let bw = @io::BytesWriter(); - val.encode(~std::json::Encoder(bw as io::Writer)); - str::from_bytes(bw.bytes.data) + do io::with_str_writer |writer| { + val.encode(~std::json::Encoder(writer)); + } } #[test] fn alltts () { -- cgit 1.4.1-3-g733a5