Conversation
6e7a0f3 to
728f67e
Compare
hrxi
left a comment
There was a problem hiding this comment.
Can you add the names of the clippy warnings that you fix to the commit description?
database/database-value/src/lib.rs
Outdated
| Cow::Borrowed(slice::from_raw_parts( | ||
| self as *const $typ as *const u8, | ||
| mem::size_of::<$typ>(), | ||
| size_of::<$typ>(), |
There was a problem hiding this comment.
What's the minimum required Rust version for this?
There was a problem hiding this comment.
Hm. Sounds a bit annoying to bump up our MSRV just to silence a warning. Perhaps we can simply disable the warning for now?
There was a problem hiding this comment.
Fixed by allowing this Clippy lint
| /// * AddStake | ||
| /// The type of transaction, parameters and proof are given in the data field of the transaction. | ||
| /// | ||
| /// The type of transaction, parameters and proof are given in the data field of the transaction. |
There was a problem hiding this comment.
This fix seems incorrect(?). It looks like it should belong inside the 1..
There was a problem hiding this comment.
It's part of 1. but being on the next line directly after * AddStake it thinks its part of the list thus needs to be indented up to the same level.
There was a problem hiding this comment.
Both are incorrect, as far as I can tell.
Before, it was part of * AddStake which is clearly incorrect. Afterwards, it's now a free-standing text, but it should be part of the first enumeration item "1.".
I don't know if that can be fixed properly.
If not, perhaps we could reword the text so that
The type of transaction, parameters and proof are given in the data field of the transaction.
can right after the "1."?
| /// * RemoveStake | ||
| /// The type of transaction, parameters and proof are given in the proof field of the transaction. | ||
| /// | ||
| /// The type of transaction, parameters and proof are given in the proof field of the transaction. |
| fn from(signature: G1Projective) -> Self { | ||
| let mut buffer = [0u8; SIZE]; | ||
| CanonicalSerialize::serialize_compressed(&signature.into_affine(), &mut &mut buffer[..]) | ||
| CanonicalSerialize::serialize_compressed(&signature.into_affine(), &mut buffer[..]) |
There was a problem hiding this comment.
warning: the borrowed expression implements the required traits
--> bls/src/types/compressed_signature.rs:96:76
|
96 | CanonicalSerialize::serialize_compressed(&signature.into_affine(), &mut &mut buffer[..])
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut buffer[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
728f67e to
fb9ee0b
Compare
e223b8b to
ac7a4f3
Compare
Fixes: unexpected `cfg` condition name: `tokio_unstable` by setting `workspace.lints.rust.unexpected_cfgs` Fixes: doc list item missing indentation Ignore lint until MSVR 1.80: unnecessary qualification of `mem` in `mem::size_of` Fixes: unnecessary qualification of `nimiq_database::mdbx` in `nimiq_database::mdbx::MdbxDatabase` Fixes: the borrowed expression implements the required traits in case of `&mut &mut buffer` The unexpected cfg condition value 'parallel' in the primitives crate will be addressed in a separate PR by @ii-cruz
ac7a4f3 to
b0eff5c
Compare


Various Clippy fixes with Rust 1.80.
Noticeable changes causing most new Clippy warnings:
size_ofis now part of the prelude Addsize_ofandsize_of_valandalign_ofandalign_of_valto the prelude rust-lang/rust#123168-Zcheck-cfgis now enabled by default Stabilize-Zcheck-cfgas always enabled rust-lang/cargo#13571The unexpected
cfgcondition valueparallelwill be addressed in a separate PR.