actix / actix/actix-website

Update doc example of actix middleware

Aperta
#227 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
code good-first-issue
Lingua principale
HTML
Stelle
210
Fork
283
Merge medio
18h 33m
PR unite (30g)
8

Descrizione

Hi,

since v2 this middleware documentation example won't compile anymore due to lack of Req type declaration: https://actix.rs/docs/middleware/

I've been fiddling around with it to make my middleware compatible, but couldn't figure this one out:
``` rust
impl Transform for MyMiddleware
where
S: Service, Error = Error>,
S::Future: 'static,
B: 'static,
{
```
the compiler complains about
`S: Service, Error = Error>,`
because

```
wrong number of type arguments: expected 1, found 0
expected 1 type argument
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.