Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a complaint from clippy #762

Merged
merged 1 commit into from Nov 4, 2022
Merged

Fix a complaint from clippy #762

merged 1 commit into from Nov 4, 2022

Conversation

psychon
Copy link
Owner

@psychon psychon commented Nov 4, 2022

error: the borrowed expression implements the required traits
  --> x11rb/tests/resource_manager.rs:96:13
   |
96 |             &dir,
   |             ^^^^ help: change this to: `dir`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`

No idea why beta clippy only cares about this one instance. This file is full of more cases of the same, I think. But whatever.

New Rust release, new PR to please the clippy god.

Edit: Ah, I know why. Otherwise one gets "use of moved value"-errors.

error: the borrowed expression implements the required traits
  --> x11rb/tests/resource_manager.rs:96:13
   |
96 |             &dir,
   |             ^^^^ help: change this to: `dir`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`

Signed-off-by: Uli Schlachter <psychon@znc.in>
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Base: 13.54% // Head: 13.54% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (1e5dff3) compared to base (7d0dafa).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #762      +/-   ##
==========================================
- Coverage   13.54%   13.54%   -0.01%     
==========================================
  Files         141      141              
  Lines      119908   119908              
==========================================
- Hits        16244    16243       -1     
- Misses     103664   103665       +1     
Flag Coverage Δ
tests 13.54% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
x11rb/tests/resource_manager.rs 63.67% <100.00%> (ø)
x11rb/tests/multithread_test.rs 90.60% <0.00%> (-0.68%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mergify mergify bot merged commit 33a438c into master Nov 4, 2022
@mergify mergify bot deleted the fix-clippy-complaints branch November 4, 2022 17:42
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.

None yet

2 participants