impl Transform for Option
- Lingua principale
- Rust
- Stelle
- 775
- Fork
- 363
- Merge medio
- 21h 2m
- PR unite (30g)
- 31
Descrizione
This topic continues https://github.com/actix/actix-web/pull/2858 , whole goal is to `.wrap` an optional middleware. `Condition` middleware exists but requires a transformer even when unused. It seems to me that using an `Option` is more natural. But as that PR was on a different crate than `Transform`'s, a newtype was introduced, and `.into()` required an explicit annotation. Sadly this was non-optimal.
@fakeshadow suggested that this feature should rather be moved into `Transform`'s crate, so that `.wrap` can natively take an `Option`. This would mean moving the `ConditionMiddleware` code too.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.