From 619dca1bfeab59dc58914f32c8ba315e545bf18f Mon Sep 17 00:00:00 2001 From: Alie Date: Fri, 26 Jan 2024 18:58:32 +0100 Subject: [PATCH] clippy --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 540e562..1aabc3f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,15 @@ -use async_std; -use log; + + use mastodon_async::entities::visibility::Visibility; use mastodon_async::helpers::{cli, toml as masto_toml}; use mastodon_async::prelude::*; -use reqwest; + use serde::{Deserialize, Serialize}; use std::collections::HashSet; use std::io::{Cursor, Write}; use std::process::exit; use std::time::Duration; -use toml; + #[derive(Debug, Serialize)] struct AccountUpdate { @@ -176,7 +176,7 @@ fn set_url_as_posted(config: &Config, url: &String) -> DynResult<()> { .write(true) .append(true) // This is needed to append to file .open(&config.files.posted)?; //.expect("Cannot open posted file"); // Maybe we should retry just in case - write!(file, "{}\n", url)?; //.expect("Cannot write to posted file"); // maybe we should retry tbh + writeln!(file, "{}", url)?; //.expect("Cannot write to posted file"); // maybe we should retry tbh log::info!("Set url {} as posted", url); Ok(()) } @@ -284,7 +284,7 @@ mod tests { let client = reqwest::Client::new(); let config = get_config(); let account = get_account(&config).await; - let msg = format!("Test!"); + let msg = "Test!".to_string(); let status = post(&account, &msg, Visibility::Direct).await.unwrap(); let response = client