clippy
This commit is contained in:
parent
35e2ce36e9
commit
619dca1bfe
12
src/main.rs
12
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
|
||||
|
|
Loading…
Reference in New Issue