Skip to content

Conversation

@cakebaker
Copy link
Contributor

This PR fixes warnings from the manual_div_ceil and double_ended_iterator_last lints.

@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.30%. Comparing base (013be1b) to head (5cb273e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/find/matchers/printf.rs 0.00% 1 Missing ⚠️
src/xargs/mod.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #522   +/-   ##
=======================================
  Coverage   87.30%   87.30%           
=======================================
  Files          31       31           
  Lines        6822     6824    +2     
  Branches      327      327           
=======================================
+ Hits         5956     5958    +2     
  Misses        631      631           
  Partials      235      235           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

if *large_blocks {
// Ceiling divide in half.
(blocks + 1) / 2
blocks.div_ceil(2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well make the same fix right above:

let blocks = (meta()?.len() + STANDARD_BLOCK_SIZE - 1) / STANDARD_BLOCK_SIZE;

Side note: I think the code here is wrong, but that can be fixed in a different PR. It should be more like

let blocks = meta()?.blocks();
let len = blocks * STANDARD_BLOCK_SIZE;
let bs = if *large_blocks { 1024 } else { 512 };
blocks.div_ceil(len, bs)

@sylvestre sylvestre force-pushed the clippy_fix_warnings_from_rust_1_86 branch from 0247b27 to 5cb273e Compare April 4, 2025 07:21
@sylvestre sylvestre merged commit 81c39aa into uutils:main Apr 4, 2025
19 of 20 checks passed
@cakebaker cakebaker deleted the clippy_fix_warnings_from_rust_1_86 branch April 4, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants