From 766b27e902bf4fc49f131443cd5a247c73cd4e72 Mon Sep 17 00:00:00 2001 From: Garrett Berg Date: Mon, 24 Jul 2017 09:46:24 -0600 Subject: fix Serializer::pretty_array(false) --- src/ser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ser.rs b/src/ser.rs index fb9f424..863bd75 100644 --- a/src/ser.rs +++ b/src/ser.rs @@ -310,11 +310,11 @@ impl<'a> Serializer<'a> { /// ] /// ``` pub fn pretty_array(&mut self, value: bool) -> &mut Self { - self.settings.array = Some(if value { - ArraySettings::pretty() + self.settings.array = if value { + Some(ArraySettings::pretty()) } else { - ArraySettings::default() - }); + None + }; self } -- cgit v1.2.3