Skip to content

zeroize: run clippy, clean up some docs and typos - #967

Closed
brxken128 wants to merge 4 commits into
RustCrypto:masterfrom
brxken128:zeroize-clippy-and-docs
Closed

zeroize: run clippy, clean up some docs and typos#967
brxken128 wants to merge 4 commits into
RustCrypto:masterfrom
brxken128:zeroize-clippy-and-docs

Conversation

@brxken128

Copy link
Copy Markdown
Contributor

This PR is rather self explanatory. I opted to allow inline(always) as in an application there's a good chance thst these will be pretty hot paths.

I also allowed wildcard imports within the aarch64 and x86 modules, as it'd just be a pain to keep track of all of the separate types.

Additionally, I chose to keep the notice about the lack of support for clearing registers. Inline-ASM is now a thing and end users are able to use it as they wish, but it's not specific to SIMD registers (which I failed to understand at first). We could maybe remove the part about the rustc support requirement/update it a little to make it more accurate for the current state of Rust, but I'm not really sure in that regard.

@brxken128brxken128 changed the title zeroize: run clipp, clean up some docs and typoszeroize: run clippy, clean up some docs and typosOct 22, 2023
@tarcieri

Copy link
Copy Markdown
Member

I'm not sure why this PR is needed. We already run clippy against all crates as part of the workspace workflow:

Locally clippy passes for me with Rust 1.72 installed:

$ rustc --versionrustc 1.72.0 (5680fa18f 2023-08-23)
$ cargo clippy --all-features -- -D warningswarning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifestnote: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest Finished dev [optimized + debuginfo] target(s) in 0.00s

@brxken128

Copy link
Copy Markdown
ContributorAuthor

I have my flycheck configured with some (probably too harsh) settings, and these are just what were picked up while I was working on other parts of the crate - feel free to close this if you though as I can see why it's probably useless (although size_of was spelt size_pf in one spot, I could probably slip that singular change into one of my other open PRs though if preferable)

@tarcieri

Copy link
Copy Markdown
Member

I think clippy fixes should correspond to lints enabled in lib.rs, which also makes them reproducible (at least for a given version of clippy).

Since we're clean under the default configuration on the latest stable release of Rust, I'm going to close this.

@tarcieri

Copy link
Copy Markdown
Member

Also PRs for typos welcome

Sign up for freeto 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.

2 participants

@brxken128@tarcieri