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 clippy complaint in generator/ and x11rb-protocol/benches/ #752

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

psychon
Copy link
Owner

@psychon psychon commented Aug 14, 2022

error: named argument `width` is not used by name
  --> generator/src/generator/special_cases.rs:44:21
   |
33 | ///     format: {},
   |                 -- this formatting argument uses named argument `width` by position
...
44 |                     width = width,
   |                     ^^^^^ this named argument is referred to by position in formatting string
   |
   = note: `-D named-arguments-used-positionally` implied by `-D warnings`
help: use the named argument by name to avoid ambiguity
   |
33 | ///     format: {width},
   |                  +++++

Signed-off-by: Uli Schlachter [email protected]


Now also fixes:

error: this expression borrows a value the compiler would automatically borrow
  --> x11rb-protocol/benches/proto_connection.rs:79:21
   |
79 |                     (&mut v[2..4]).copy_from_slice(&our_seqno.to_ne_bytes());
   |                     ^^^^^^^^^^^^^^ help: change this to: `v[2..4]`
   |
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: named argument `width` is not used by name
  --> generator/src/generator/special_cases.rs:44:21
   |
33 | ///     format: {},
   |                 -- this formatting argument uses named argument `width` by position
...
44 |                     width = width,
   |                     ^^^^^ this named argument is referred to by position in formatting string
   |
   = note: `-D named-arguments-used-positionally` implied by `-D warnings`
help: use the named argument by name to avoid ambiguity
   |
33 | ///     format: {width},
   |                  +++++

Signed-off-by: Uli Schlachter <[email protected]>
@codecov
Copy link

codecov bot commented Aug 14, 2022

Codecov Report

Merging #752 (62d2b42) into master (cac9118) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #752   +/-   ##
=======================================
  Coverage   13.54%   13.54%           
=======================================
  Files         141      141           
  Lines      119916   119916           
=======================================
+ Hits        16238    16239    +1     
+ Misses     103678   103677    -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 Δ
generator/src/generator/special_cases.rs 99.41% <100.00%> (ø)
x11rb-protocol/src/resource_manager/parser.rs 96.44% <0.00%> (+0.16%) ⬆️

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

error: this expression borrows a value the compiler would automatically borrow
  --> x11rb-protocol/benches/proto_connection.rs:79:21
   |
79 |                     (&mut v[2..4]).copy_from_slice(&our_seqno.to_ne_bytes());
   |                     ^^^^^^^^^^^^^^ help: change this to: `v[2..4]`
   |
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Uli Schlachter <[email protected]>
@psychon psychon force-pushed the update-for-new-rust branch from 1b89fb4 to 62d2b42 Compare August 14, 2022 11:50
@psychon
Copy link
Owner Author

psychon commented Aug 14, 2022

The msrv-check build failure is serde-rs/serde#2255 and will hopefully resolve itself via a new serde release.

@psychon psychon changed the title Fix clippy complaint in generator/ Fix clippy complaint in generator/ and x11rb-protocol/benches/ Aug 14, 2022
@psychon
Copy link
Owner Author

psychon commented Aug 19, 2022

Review timeout. This is simple enough that I'll just go ahead and merge this.

@psychon psychon merged commit d75825c into master Aug 19, 2022
@psychon psychon deleted the update-for-new-rust branch August 19, 2022 14:21
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.

1 participant