Compare commits

..

2 Commits

Author SHA1 Message Date
dependabot[bot] de85c57e88
build(deps): bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action), [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) and [actions/cache](https://github.com/actions/cache).


Updates `DavidAnson/markdownlint-cli2-action` from 21 to 22
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v21...v22)

Updates `peter-evans/create-pull-request` from 7 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-version: '22'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
1 week ago
Tamir Duberstein 5bf66d6127
integration-test: appease clippy
Before this change:
```
warning: manual saturating arithmetic
   --> test/integration-test/src/tests/ring_buf.rs:235:9
    |
235 | /         data.len()
236 | |             .checked_sub(RING_BUF_MAX_ENTRIES - 1)
237 | |             .unwrap_or_default(),
    | |________________________________^ help: consider using `saturating_sub`: `data.len().saturating_sub(RING_BUF_MAX_ENTRIES - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
    = note: `-W clippy::manual-saturating-arithmetic` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::manual_saturating_arithmetic)]`

warning: manual saturating arithmetic
   --> test/integration-test/src/tests/ring_buf.rs:244:20
    |
244 |     let min_seen = max_seen.checked_sub(max_dropped).unwrap_or_default();
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `max_seen.saturating_sub(max_dropped)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic

warning: manual saturating arithmetic
   --> test/integration-test/src/tests/ring_buf.rs:245:24
    |
245 |     let min_rejected = max_rejected.checked_sub(dropped).unwrap_or_default();
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `max_rejected.saturating_sub(dropped)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic

warning: `integration-test` (lib test) generated 3 warnings (run `cargo clippy --fix --lib -p integration-test --tests` to apply 3 suggestions)
```
1 week ago

@ -231,18 +231,14 @@ async fn ring_buf_async_with_drops() {
// Make sure that there is nothing else in the ring_buf.
assert_matches!(async_fd.into_inner().next(), None);
let max_dropped: u64 = u64::try_from(
data.len()
.checked_sub(RING_BUF_MAX_ENTRIES - 1)
.unwrap_or_default(),
)
.unwrap();
let max_dropped: u64 =
u64::try_from(data.len().saturating_sub(RING_BUF_MAX_ENTRIES - 1)).unwrap();
let max_seen = u64::try_from(data.iter().filter(|v| *v % 2 == 0).count()).unwrap();
let max_rejected = u64::try_from(data.len()).unwrap() - max_seen;
let Registers { dropped, rejected } = regs.get(&0, 0).unwrap().iter().sum();
let total = u64::try_from(data.len()).unwrap();
let min_seen = max_seen.checked_sub(max_dropped).unwrap_or_default();
let min_rejected = max_rejected.checked_sub(dropped).unwrap_or_default();
let min_seen = max_seen.saturating_sub(max_dropped);
let min_rejected = max_rejected.saturating_sub(dropped);
let facts = format!(
"seen={seen}, rejected={rejected}, dropped={dropped}, total={total}, max_seen={max_seen}, \
max_rejected={max_rejected}, max_dropped={max_dropped}",

Loading…
Cancel
Save