Skip to content

chore(clippy): fix nightly lints#998

Merged
reubeno merged 2 commits into
reubeno:mainfrom
xtqqczze:clippy-nightly
Feb 17, 2026
Merged

chore(clippy): fix nightly lints#998
reubeno merged 2 commits into
reubeno:mainfrom
xtqqczze:clippy-nightly

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates a couple of std::time::Duration/Result idioms to satisfy newer clippy/nightly lints in brush-core, without changing runtime behavior.

Changes:

  • Adjust a timing unit test to use Duration::from_millis(1) instead of from_micros(1000).
  • Simplify OpenFile::is_dir() by using Result::is_ok_and().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
brush-core/src/timing.rs Updates a unit test duration constructor to align with clippy’s preferred idioms.
brush-core/src/openfiles.rs Replaces map(...).unwrap_or(false) with is_ok_and(...) for clearer Result handling.

Comment thread brush-core/src/timing.rs Outdated
@xtqqczze xtqqczze requested a review from reubeno February 17, 2026 21:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 17, 2026

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.22 μs 17.13 μs -0.09 μs 🟢 -0.49%
eval_arithmetic 0.15 μs 0.15 μs 0.00 μs ⚪ Unchanged
expand_one_string 1.54 μs 1.57 μs 0.03 μs ⚪ Unchanged
for_loop 22.55 μs 22.68 μs 0.13 μs ⚪ Unchanged
full_peg_complex 58.48 μs 57.95 μs -0.53 μs ⚪ Unchanged
full_peg_for_loop 6.28 μs 6.15 μs -0.13 μs 🟢 -2.04%
full_peg_nested_expansions 17.06 μs 16.84 μs -0.22 μs ⚪ Unchanged
full_peg_pipeline 4.26 μs 4.20 μs -0.06 μs ⚪ Unchanged
full_peg_simple 1.81 μs 1.80 μs -0.01 μs ⚪ Unchanged
function_call 2.07 μs 2.15 μs 0.08 μs ⚪ Unchanged
instantiate_shell 53.59 μs 53.90 μs 0.31 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 26510.94 μs 26588.76 μs 77.82 μs ⚪ Unchanged
parse_peg_bash_completion 2069.52 μs 2068.76 μs -0.76 μs ⚪ Unchanged
parse_peg_complex 19.90 μs 19.65 μs -0.25 μs 🟢 -1.28%
parse_peg_for_loop 2.01 μs 1.97 μs -0.04 μs 🟢 -1.99%
parse_peg_pipeline 2.12 μs 2.05 μs -0.08 μs 🟢 -3.53%
parse_peg_simple 1.11 μs 1.09 μs -0.01 μs ⚪ Unchanged
run_echo_builtin_command 16.20 μs 16.73 μs 0.53 μs 🟠 +3.26%
tokenize_sample_script 3.47 μs 3.47 μs 0.00 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
Overall Coverage 🟢 73.1% 🟢 73.1% ⚪ 0%

Minimum allowed coverage is 70%, this run produced 73.1%

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1560 73.97
❗️ Error 18 0.85
❌ Fail 177 8.39
⏩ Skip 339 16.07
❎ Expected Fail 13 0.62
✔️ Unexpected Pass 2 0.09
📊 Total 2109 100.00

@reubeno
Copy link
Copy Markdown
Owner

reubeno commented Feb 17, 2026

Thanks for proactively contributing this!

The only check failure is unrelated to your change; it's something we're tracking as an upstream issue caused by recent runner changes. We won't worry about that.

@reubeno reubeno merged commit 7e69542 into reubeno:main Feb 17, 2026
43 of 44 checks passed
@xtqqczze xtqqczze deleted the clippy-nightly branch February 17, 2026 22:40
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