make fmt happy

This commit is contained in:
VC
2023-11-07 17:23:38 +01:00
parent 8c7e60881b
commit 5059abe685
3 changed files with 6 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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<dyn Error>> {
debug!("Write struct {:?}", t);
conn.execute(

View File

@@ -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<Tag>) -> Result<(), Box<dyn Error>> {
for tag in tags {