@fredvanzwieten the example shared on the docs at https://docs.rs/jsonwebtoken/7.2.0/jsonwebtoken/fn.encode.html worked for me to where rust-analyzer and cargo build worked for me. Have you tried running `cargo build` by hand to see if there are any additional diagnostics output? I am using the latest version of the crate as I just installed it but maybe a full build will give you a better hint.
@fredvanzwieten Hm, so I would try it explicitly ascribing `let token: String = ` ... but *not* ascribing within the match? This is pretty weird though, because the result type of `encode` isn't polymorphic, it really *should* be able to figure this out.
I don't know why it would make a difference, but you could also try explicitly ascribing the type of your claims as `match encode::<MyClaimsType>(...) { ... }` just to give the compiler all the hints it needs?
@lewdum Yes! this was the problem. Thanks!
use anyhow::Ok;