From ab4b0823b618018fd3e237b5f3df9853b5e9f773 Mon Sep 17 00:00:00 2001 From: Alie Date: Fri, 26 Jan 2024 18:48:40 +0100 Subject: [PATCH 1/2] changed version and updated deps --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95cbfe6..d11b776 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -850,7 +850,7 @@ dependencies = [ [[package]] name = "mastodon-image-uploader-bot" -version = "0.2.2" +version = "0.3.0" dependencies = [ "async-std", "log", @@ -859,7 +859,7 @@ dependencies = [ "serde", "stderrlog", "tokio", - "toml 0.7.6", + "toml 0.8.8", ] [[package]] @@ -1287,9 +1287,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -1620,9 +1620,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", @@ -1632,18 +1632,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.13" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.0.0", "serde", diff --git a/Cargo.toml b/Cargo.toml index dc378b7..3addf43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mastodon-image-uploader-bot" -version = "0.2.2" +version = "0.3.0" edition = "2021" [alias] @@ -12,7 +12,7 @@ test = "cargo test -- --test-threads=1" tokio = { version = "1", features = ["macros", "rt-multi-thread"] } reqwest = "0.11.14" serde = "1.0.171" -toml = "0.7.1" +toml = "0.8.8" log = "0.4.19" stderrlog = "0.5.4" async-std = "1.12.0" From 25c4ba4b9724799dd4347efba3cc324e73a5d660 Mon Sep 17 00:00:00 2001 From: Alie Date: Fri, 26 Jan 2024 18:53:26 +0100 Subject: [PATCH 2/2] using an import incorrectly --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2c5c042..540e562 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use async_std; -use log::{self, info}; +use log; use mastodon_async::entities::visibility::Visibility; use mastodon_async::helpers::{cli, toml as masto_toml}; use mastodon_async::prelude::*; @@ -177,7 +177,7 @@ fn set_url_as_posted(config: &Config, url: &String) -> DynResult<()> { .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 - info!("Set url {} as posted", url); + log::info!("Set url {} as posted", url); Ok(()) }