actix / actix/actix-website

Update doc example of actix middleware

Đang mở
#227 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
code good-first-issue
Ngôn ngữ chính
HTML
Star
210
Fork
283
Merge trung bình
18 giờ 33 phút
Pull request đã merge (30 ngày)
8

Mô tả

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
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.