From 9e938d0585f647ee65d63eb6b365fcb05eedd533 Mon Sep 17 00:00:00 2001 From: Jarred Nicholls Date: Tue, 5 Jan 2016 09:38:49 -0500 Subject: [PATCH] Make the constructor methods publicly visible for the PrettyFormatter. --- json/src/ser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/src/ser.rs b/json/src/ser.rs index 122fc4b..5782554 100644 --- a/json/src/ser.rs +++ b/json/src/ser.rs @@ -440,11 +440,11 @@ pub struct PrettyFormatter<'a> { } impl<'a> PrettyFormatter<'a> { - fn new() -> Self { + pub fn new() -> Self { PrettyFormatter::with_indent(b" ") } - fn with_indent(indent: &'a [u8]) -> Self { + pub fn with_indent(indent: &'a [u8]) -> Self { PrettyFormatter { current_indent: 0, indent: indent,