Closed fejfighter closed 1 year ago
Something is wrong with your tokio::select!
I guess. I can't reproduce it. Can you share your Cargo.toml
?
[package]
name = "nnrgmail"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
google-gmail1 = "4.0.1+20220228"
hyper = "0.14.20"
hyper-tls = "0.5.0"
hyper-rustls = "0.23.0"
axum-server = "~0.4"
tokio = { version = "~1.2", features = [
"macros",
"io-util",
"rt",
"rt-multi-thread",
"fs",
] }
futures-util = "0.3.24"
tokio-rustls = "0.23.4"
rustls = "*"
rustls-pemfile = "1.0.1"
open = "1"
form_urlencoded = "1.1.0"
serde = "*"
serde_json = "*"
[dependencies.async-std]
version = "1.6"
features = ["attributes"]
Sorry, I have been AFK for the last few days, there's a heap of extra stuff there because in the interest of progress/experimentation I have hacked something together short term with hyper.
from what you have suggested I might be missing a feature flag in tokio?
Found the problem. It seems like tokio
added biased
option (which axum-server
use) in version 1.4
and you are forcing to use version 1.2
.
A slight oversight on my part. I should put tokio
dependency to version 1.4
instead of 1
.
Awesome, that works for me.
Not 100% sure why I had 1.2, probably from some tutorial/quick start I was looking at.
closing as this seems to fix the issue
I seem to be having trouble incorporating the example code into a toy project I am playing with to learn a bit of rust.
Not sure what he cause is, but I'm on 1.64 on fedora if that makes much of a difference