From 70bfb11e46560e74483cb6cb7c9ee7781e49c56c Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 24 Sep 2023 18:45:34 -0400 Subject: [PATCH] Re-arrange .to_owned() placement to stop clippy from complaining --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9e689f3..742e8da 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,10 +85,10 @@ async fn main() { .unwrap(); let state_clone = initial_state.clone(); - let st = state_clone.record.lock().unwrap(); + let st = state_clone.record.lock().unwrap().to_owned(); serde_json::to_writer( &std::fs::File::create("votes.json").unwrap(), - &st.to_owned(), + &st, ) .expect("TODO: panic message"); }