tomaka / rouille

Web framework in Rust
Apache License 2.0
1.12k stars 106 forks source link

Clippy suggests replacing str::{starts,ends}_with with strip_{prefix,suffix} #237

Closed rogertsui0923 closed 3 years ago

rogertsui0923 commented 3 years ago

First of all, many thanks for the Rouille library. Running Clippy 0.1.51 emits this warning. I assume it is due to this pattern in the router! implementation.

bradfier commented 3 years ago

You're right! Unfortunately that feature isn't stable on 1.41.1 (our MSRV) so we can't just swap out the calls.

I thought I had added #[allow] for the lints we "can't" fix but I must have missed this one.

rogertsui0923 commented 3 years ago

Thanks for the quick reply! That makes sense.

bradfier commented 3 years ago

I was able to silence the error by setting an msrv value in clippy.toml :slightly_smiling_face:

That change is in c86bbf422d1d6 and will be in a release at some point this week.