Clippy warning: this could be a `const fn` on fn returning Self
Open
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Bug Report
### Version
`v0.9.1`
### Platform
Darwin Kernel Version 22.4.0
### Crates
`tonic-build`
### Description
After upgrading from v0.8.4 to v0.9.1 , seeing that the generated function below is being flagged by clippy as could be const.
```
error: this could be a `const fn`
--> /vector/target/debug/build/vector-16666aff764888ca/out/google.pubsub.v1.rs:423:9
|
423 | / pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
424 | | self.max_decoding_message_size = Some(limit);
425 | | self
426 | | }
| |_________^
```
Contributor guide
Assessment
This issue has not been assessed yet.