diff --git a/Cargo.lock b/Cargo.lock index d41be78..a80d64d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1097,7 +1097,7 @@ dependencies = [ [[package]] name = "rss-anime-notifier-rs" -version = "0.1.3" +version = "0.1.4" dependencies = [ "chrono", "reqwest", @@ -1308,18 +1308,6 @@ dependencies = [ "mio", "pin-project-lite", "slab", - "tokio-macros", -] - -[[package]] -name = "tokio-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -dependencies = [ - "proc-macro2", - "quote", - "syn", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0d73286..527c184 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rss-anime-notifier-rs" -version = "0.1.3" +version = "0.1.4" authors = ["blank X "] edition = "2018" @@ -16,4 +16,4 @@ chrono = "0.4.19" serde_json = "1.0" reqwest = "0.10.8" serde = { version = "1.0.117", features = ["derive"] } -tokio = { version = "0.2.22", features = ["rt-core", "macros"] } +tokio = { version = "0.2.22", features = ["rt-core"] } diff --git a/src/main.rs b/src/main.rs index 3f311a0..371b0e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,8 +141,7 @@ async fn give_response(anime_id: usize, client: Client) -> Result port.parse::().unwrap(), Err(_) => 8080 @@ -156,3 +155,9 @@ async fn main() { eprintln!("INFO: Listening on 127.0.0.1:{}", port); warp::serve(routes).run(([127, 0, 0, 1], port)).await; } + +fn main() { + tokio::runtime::Runtime::new() + .unwrap() + .block_on(async_main()); +}