diff options
Diffstat (limited to 'src/libstd/json.rs')
| -rw-r--r-- | src/libstd/json.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 58f580bde51..ed3dbb48b2a 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -337,9 +337,11 @@ pub fn to_writer(wr: io::Writer, json: &Json) { } /// Encodes a json value into a string -pub pure fn to_str(json: &Json) -> ~str unsafe { - // ugh, should be safe - io::with_str_writer(|wr| to_writer(wr, json)) +pub pure fn to_str(json: &Json) -> ~str { + unsafe { + // ugh, should be safe + io::with_str_writer(|wr| to_writer(wr, json)) + } } /// Encodes a json value into a io::writer |
