From 8d5a61c9787fd439fc15fe5c490d50bb3776135c Mon Sep 17 00:00:00 2001 From: Curt Hagenlocher Date: Wed, 23 Aug 2023 05:32:19 -0700 Subject: [PATCH] Formatting fixes --- rust/src/action/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/src/action/mod.rs b/rust/src/action/mod.rs index e0d5db822d..62993398f9 100644 --- a/rust/src/action/mod.rs +++ b/rust/src/action/mod.rs @@ -211,15 +211,15 @@ impl PartialStats { num_records: self.num_records, min_values: match min_values { Some(minv) => minv, - None => HashMap::default() + None => HashMap::default(), }, max_values: match max_values { Some(maxv) => maxv, - None => HashMap::default() + None => HashMap::default(), }, null_count: match null_count { Some(nc) => nc, - None => HashMap::default() + None => HashMap::default(), }, } } @@ -461,14 +461,15 @@ impl Add { /// Returns the serde_json representation of stats contained in the action if present. /// Since stats are defined as optional in the protocol, this may be None. pub fn get_json_stats(&self) -> Result, serde_json::error::Error> { - let ps: Result, serde_json::error::Error> = self.stats + let ps: Result, serde_json::error::Error> = self + .stats .as_ref() .map_or(Ok(None), |s| serde_json::from_str(s)); match ps { Ok(Some(mut partial)) => Ok(Some(partial.as_stats())), Ok(None) => Ok(None), - Err(e) => Err(e) + Err(e) => Err(e), } } }