googleapis / googleapis/google-cloud-rust
Simplify lease extension logic by using `extract_if()`
Open
type: cleanup
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
https://github.com/googleapis/google-cloud-rust/blob/6266932ed16db0f9d1b472dda42fcc02020eadb7/src/pubsub/src/subscriber/lease_state/exactly_once.rs#L92
This logic could be simplified if we used `extract_if()`. The only problem is it was added in Rust version 1.88, which is higher than our MSRV.
When we bump to MSRV of 1.88, we should revisit this code.
https://github.com/googleapis/google-cloud-rust/pull/4880#discussion_r2880410486
Contributor guide
Assessment
This issue has not been assessed yet.