From 9b9ddc1d4248535898b2832152a1788388d48d0b Mon Sep 17 00:00:00 2001 From: Alie Date: Tue, 7 Jan 2025 17:16:50 +0100 Subject: [PATCH] cleanup comments --- src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index dd70057..605606f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ struct Errors { retry: u8, } -#[tokio::main] // requires `features = ["mt"] +#[tokio::main] async fn main() -> DynResult<()> { stderrlog::new() .module(module_path!()) @@ -175,8 +175,8 @@ fn generate_config() -> DynResult<()> { } fn parse_config(filename: &str) -> DynResult { - let toml_file = std::fs::read_to_string(filename)?; //.expect("No config file, consider getting the original one and modifing it"); - Ok(toml::from_str(&toml_file)?) //("Malformed config file, check the original one for reference") + let toml_file = std::fs::read_to_string(filename)?; + Ok(toml::from_str(&toml_file)?) } async fn get_next_url(config: &Config) -> DynResult> { @@ -384,8 +384,8 @@ async fn register(client: &Client, config: &Config) { } fn parse_mastodon_data(filename: &str) -> DynResult { - let toml_file = std::fs::read_to_string(filename)?; //.expect("No config file, consider getting the original one and modifing it"); - Ok(toml::from_str(&toml_file)?) //("Malformed config file, check the original one for reference") + let toml_file = std::fs::read_to_string(filename)?; + Ok(toml::from_str(&toml_file)?) } #[derive(Deserialize)] @@ -598,7 +598,6 @@ mod tests { const IMAGE: &str = "https://picsum.photos/id/1"; let expected = insert_image(&config, IMAGE).await.unwrap(); - // Get test url let image = get_next_url(&config).await.unwrap().unwrap(); assert_eq!(image.url, IMAGE); @@ -613,7 +612,6 @@ mod tests { let image = image.image; assert_eq!(image.status, "consumed"); - // Test that now it does not get it let image = get_next_url(&config).await.unwrap(); assert_eq!(image, None); }