From 1fb973bc3609a66c539e0196903a68d236157906 Mon Sep 17 00:00:00 2001 From: rascul Date: Wed, 22 Jun 2022 21:37:10 -0500 Subject: [PATCH] cargo fmt --- src/wot_log.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wot_log.rs b/src/wot_log.rs index 1d0f8ee..5c217f0 100644 --- a/src/wot_log.rs +++ b/src/wot_log.rs @@ -7,7 +7,7 @@ use actix_multipart::Multipart; use chrono::Utc; use futures_util::StreamExt; use harsh::Harsh; -use serde_json::{Map, Value, to_string_pretty}; +use serde_json::{to_string_pretty, Map, Value}; use crate::{client, Client}; @@ -101,9 +101,7 @@ impl WotLog { } Client::TinTin => (), Client::ZMud => (), - Client::None => { - return Err("no client specified".into()) - } + Client::None => return Err("no client specified".into()), }; self.json = map.into(); @@ -119,7 +117,8 @@ impl WotLog { std::fs::create_dir(&path)?; } - let mut file = OpenOptions::new().write(true).create_new(true).open(&path.join(&self.id))?; + let mut file = + OpenOptions::new().write(true).create_new(true).open(&path.join(&self.id))?; file.write_all(to_string_pretty(&self.json)?.as_bytes())?; Ok(())