aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett Berg <vitiral@gmail.com>2017-07-24 09:46:24 -0600
committerGarrett Berg <vitiral@gmail.com>2017-07-24 09:46:24 -0600
commit766b27e902bf4fc49f131443cd5a247c73cd4e72 (patch)
treee170801f6963ab18a8d7dab607588a3af39ade3e /src
parent11e2baa1d4816a96a38c1ab2546332c83b1beb4f (diff)
downloadmilf-rs-766b27e902bf4fc49f131443cd5a247c73cd4e72.tar.gz
milf-rs-766b27e902bf4fc49f131443cd5a247c73cd4e72.zip
fix Serializer::pretty_array(false)
Diffstat (limited to 'src')
-rw-r--r--src/ser.rs8
1 files changed, 4 insertions, 4 deletions
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
}