Skip to content

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Mar 17, 2025

Since this is blocking other PRs:

    Checking integration-test v0.0.0 (/home/runner/work/heroku-java-metrics-agent/heroku-java-metrics-agent/integration-test)
error: usage of `.map(...).all(identity)`
  --> src/main.rs:88:10
   |
88 |           .map(|window| {
   |  __________^
89 | |             match window {
90 | |                 [earlier_request, later_request] => later_request
91 | |                     .time
...  |
98 | |         })
99 | |         .all(identity));
   | |______________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity
   = note: `-D clippy::map-all-any-identity` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::map_all_any_identity)]`
help: use `.all(...)` instead
   |
88 ~         .all(|window| {
89 +             match window {
90 +                 [earlier_request, later_request] => later_request
91 +                     .time
92 +                     .duration_since(earlier_request.time)
93 +                     .is_ok_and(|duration| {
94 +                         duration.as_millis() > 4500 && duration.as_millis() < 5500
95 +                     }),
96 +                 _ => false,
97 +             }
98 ~         }));
   |

Since this is blocking other PRs:

```
    Checking integration-test v0.0.0 (/home/runner/work/heroku-java-metrics-agent/heroku-java-metrics-agent/integration-test)
error: usage of `.map(...).all(identity)`
  --> src/main.rs:88:10
   |
88 |           .map(|window| {
   |  __________^
89 | |             match window {
90 | |                 [earlier_request, later_request] => later_request
91 | |                     .time
...  |
98 | |         })
99 | |         .all(identity));
   | |______________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity
   = note: `-D clippy::map-all-any-identity` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::map_all_any_identity)]`
help: use `.all(...)` instead
   |
88 ~         .all(|window| {
89 +             match window {
90 +                 [earlier_request, later_request] => later_request
91 +                     .time
92 +                     .duration_since(earlier_request.time)
93 +                     .is_ok_and(|duration| {
94 +                         duration.as_millis() > 4500 && duration.as_millis() < 5500
95 +                     }),
96 +                 _ => false,
97 +             }
98 ~         }));
   |
```
@edmorley edmorley self-assigned this Mar 17, 2025
@edmorley edmorley requested review from Malax and a team as code owners March 17, 2025 12:49
@edmorley edmorley enabled auto-merge (squash) March 17, 2025 12:49
@edmorley edmorley merged commit bc1cc4d into main Mar 18, 2025
35 checks passed
@edmorley edmorley deleted the edmorley/fix-lints branch March 18, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants