From 5059abe685f42b168d4d38676341054522e572db Mon Sep 17 00:00:00 2001 From: VC Date: Tue, 7 Nov 2023 17:23:38 +0100 Subject: [PATCH] make fmt happy --- src/lib.rs | 5 ++++- src/state.rs | 1 + src/utils.rs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 42833fd..c2aa1da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,10 @@ pub async fn run(config: &Config) { strip_mastodon_tags(&mut tweet_content, &toot.tags).unwrap(); - tweet_content = tweet_content.trim_end_matches('\n').trim_end_matches(' ').to_string(); + tweet_content = tweet_content + .trim_end_matches('\n') + .trim_end_matches(' ') + .to_string(); println!("{:?}", tweet_content); } diff --git a/src/state.rs b/src/state.rs index 8ffadc1..5339d90 100644 --- a/src/state.rs +++ b/src/state.rs @@ -36,6 +36,7 @@ pub fn read_state( } /// Writes last treated tweet id and toot id to the db +#[allow(dead_code)] pub fn write_state(conn: &Connection, t: TweetToToot) -> Result<(), Box> { debug!("Write struct {:?}", t); conn.execute( diff --git a/src/utils.rs b/src/utils.rs index 402b8e6..59406af 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,6 +1,6 @@ use megalodon::entities::status::Tag; -use std::error::Error; use regex::Regex; +use std::error::Error; pub fn strip_mastodon_tags(content: &mut String, tags: &Vec) -> Result<(), Box> { for tag in tags {