h3poteto / megalodon-rs

Fediverse API client library for Rust
Apache License 2.0
106 stars 24 forks source link

fix: cleanup warnings #207

Closed joshka closed 4 months ago

joshka commented 4 months ago
Warnings

``` warning: unused import: `app::App` --> src/firefish/entities/mod.rs:30:9 | 30 | pub use app::App; | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `reaction::Reaction` --> src/firefish/entities/mod.rs:47:9 | 47 | pub use reaction::Reaction; | ^^^^^^^^^^^^^^^^^^ warning: unused import: `stats::Stats` --> src/firefish/entities/mod.rs:50:9 | 50 | pub use stats::Stats; | ^^^^^^^^^^^^ warning: unused import: `activity::Activity` --> src/friendica/entities/mod.rs:37:9 | 37 | pub use activity::Activity; | ^^^^^^^^^^^^^^^^^^ warning: unused import: `featured_tag::FeaturedTag` --> src/friendica/entities/mod.rs:44:9 | 44 | pub use featured_tag::FeaturedTag; | ^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `marker::Marker` --> src/friendica/entities/mod.rs:52:9 | 52 | pub use marker::Marker; | ^^^^^^^^^^^^^^ warning: unused import: `report::Report` --> src/friendica/entities/mod.rs:60:9 | 60 | pub use report::Report; | ^^^^^^^^^^^^^^ warning: unused import: `token::Token` --> src/friendica/entities/mod.rs:68:9 | 68 | pub use token::Token; | ^^^^^^^^^^^^ warning: use of deprecated method `chrono::TimeZone::datetime_from_str`: use `DateTime::parse_from_str` or `NaiveDateTime::parse_from_str` with `and_utc()` or `and_local_timezone()` instead --> src/pleroma/entities/marker.rs:63:13 | 63 | Utc.datetime_from_str(&s, FORMAT) | ^^^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: `megalodon` (lib) generated 9 warnings (run `cargo fix --lib -p megalodon` to apply 8 suggestions) warning: `megalodon` (lib test) generated 9 warnings (9 duplicates) warning: use of deprecated associated function `chrono::TimeDelta::minutes`: Use `TimeDelta::try_minutes` instead --> examples/mastodon_post_with_schedule.rs:21:47 | 21 | let scheduled_at = Utc::now() + Duration::minutes(6); | ^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: `megalodon` (example "mastodon_post_with_schedule") generated 1 warning warning: use of deprecated associated function `chrono::TimeDelta::minutes`: Use `TimeDelta::try_minutes` instead --> examples/friendica_post_with_schedule.rs:21:47 | 21 | let scheduled_at = Utc::now() + Duration::minutes(6); | ^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: `megalodon` (example "friendica_post_with_schedule") generated 1 warning warning: use of deprecated associated function `chrono::TimeDelta::minutes`: Use `TimeDelta::try_minutes` instead --> examples/pleroma_post_with_schedule.rs:21:47 | 21 | let scheduled_at = Utc::now() + Duration::minutes(6); | ^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: `megalodon` (example "pleroma_post_with_schedule") generated 1 warning Finished dev [unoptimized + debuginfo] target(s) in 0.08s ```