workers-rs repo RA feature detection

Does anyone else have the problem that rust-analyzer doesn't properly detect the enabled features in the examples in the workers-rs repo?
4 Replies
avsaase
avsaase4mo ago
I'm getting a lot of errors like this
error[E0308]: mismatched types
--> examples/router/src/lib.rs:10:1
|
10 | #[event(fetch)]
| ^^^^^^^^^^^^^^^ expected `Request`, found `Request<Body>`
11 | async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
| ---- arguments to this function are incorrect
|
= note: `Request<Body>` and `worker::Request` have similar names, but are actually distinct types
error[E0308]: mismatched types
--> examples/router/src/lib.rs:10:1
|
10 | #[event(fetch)]
| ^^^^^^^^^^^^^^^ expected `Request`, found `Request<Body>`
11 | async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
| ---- arguments to this function are incorrect
|
= note: `Request<Body>` and `worker::Request` have similar names, but are actually distinct types
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
avsaase
avsaase4mo ago
Interestingly I get this error on all the other example and not the axum example (when I remove it from the excluded list)
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts
Dynamically import incompatible packages for dev onlyI am currently dynamically importing a package that is incompatible in workers just during developmeDeploy by pushHello is it possible to deploy changes with git push like it's on vercel for my worker? or i have maAre the api docs for updating worker settings wrong?Specifically looking at this request: https://developers.cloudflare.com/api/operations/worker-scriptHow to access worker queue producer bindings in local development?At boot I see this message: ``` wrangler.toml changed... Using vars defined in .dev.vars Your workeNeed some help on collecting coverage in workers.I know that the coverage via V8 is not possible, but via istanbul it does not collect coverage as weHey there! I'm having some trouble with an SSL free certificate on my website. CloudFlare is active.So I've been trying for days now but I can't get the certification of the SSL.Identity theft reportHow can I contact Cloudflare support to remove from their platform a page that is impersonating a paZero Trust - How to filter Web Socket trafficHi, I'm using an app (iray server) that uses the same port (9090) for the web UI dashboard and WebSoCan you forward certain requests from a Cloudflare Pages site to a different domain?Hello! I'm looking to see if I could deploy a site using PayloadCMS with Cloudflare Pages. They haveHi! I want to pwd-protect my Page. How to do it with Functions?I have a static page set up, live, working. I want to add password protection to the page. I found a