router icon indicating copy to clipboard operation
router copied to clipboard

make match arm exhaustive in fetch_dependency display

Open garypen opened this issue 1 year ago • 5 comments

Future clippy (nightly) complained that the match arms weren't exhaustive, so may as well fix this.

I think it's correct to replace 2.. with _.

garypen avatar May 16 '24 14:05 garypen

@garypen, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

github-actions[bot] avatar May 16 '24 14:05 github-actions[bot]

CI performance tests

  • [x] step - Basic stress test that steps up the number of users over time
  • [ ] events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • [ ] large-request - Stress test with a 1 MB request payload
  • [ ] events - Stress test for events with a lot of users and deduplication ENABLED
  • [ ] xxlarge-request - Stress test with 100 MB request payload
  • [ ] events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • [ ] xlarge-request - Stress test with 10 MB request payload
  • [ ] step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • [ ] events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • [ ] no-graphos - Basic stress test, no GraphOS.
  • [ ] reload - Reload test over a long period of time at a constant rate of users
  • [ ] events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • [ ] events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • [x] const - Basic stress test that runs with a constant number of users

router-perf[bot] avatar May 16 '24 14:05 router-perf[bot]

I don't mind it, but I don't understand why it complains about 2.. not being exhaustive. These two ways of writing it are exactly equivalent given that .len() returns usize, no?

Wouldn't it need to be 2..= to be exhaustive?

Like you, I don't feel this picky, but since future clippy complained I thought I may as well do it.

garypen avatar May 24 '24 09:05 garypen

If 2.. was not exhaustive, then it would be a hard compile error...

goto-bus-stop avatar May 24 '24 11:05 goto-bus-stop

Did you just run cargo +nightly clippy to get the warning? I don't see it when I do it today. Maybe this was a clippy bug?

goto-bus-stop avatar Jun 10 '24 08:06 goto-bus-stop

@garypen is this (still) reproducible or can we close it? 😇

goto-bus-stop avatar Jul 23 '24 09:07 goto-bus-stop

@goto-bus-stop I was running some tooling that required "nightly" and that was how I triggered it. If "nightly" isn't complaining, let's just close it. If it ever complains again in the future, it's easy to fix.

garypen avatar Jul 29 '24 09:07 garypen