Skip to content

An attempt to make clippy and rustc complain less#121

Draft
afeistel wants to merge 9 commits intorodrimati1992:masterfrom
parrrate:master
Draft

An attempt to make clippy and rustc complain less#121
afeistel wants to merge 9 commits intorodrimati1992:masterfrom
parrrate:master

Conversation

@afeistel
Copy link
Copy Markdown

@afeistel afeistel commented Dec 19, 2024

Submitting this as a draft PR, since there are somewhat many changes (I doubt anyone would be willing to review them all at once — I'll probably make separate PRs for each specific thing — just need some feedback on which of these are worth it; plus my fork currently has some changes which are just taste-based).

What I did (the important parts):

  • #[repr(C, u8)] on enums. The way enums are currently handled seems to be potentially unsound.
  • default-features (default_features is deprecated).
  • #[non_exhaustive] on structs.
  • PhantomDatafied unused tuple fields.
  • Removed target_pointer_width = "128".
  • Changed cfg(x86_64) to cfg(target_arch = "x86_64").
  • Changed ScratchSpaceInner (keeping the same ABI as far as I understand) to have better user experience (fewer warnings) at the cost of slightly more complex definition and construction (should not impact runtime at all).
  • Changed generated const names to _ where that made sense.
  • Removed empty ///s — see #[sabi_trait] with #[warn(clippy::empty_docs)] #116.
  • #[allow(clippy::needless_lifetimes)], #[allow(non_camel_case_types)] and #[allow(clippy::unnecessary_cast)] in proc-macros

@afeistel
Copy link
Copy Markdown
Author

Sorry for a total mess of a PR, but I just actually don't know if this is maintained and what direction other people want this project moving.

Comment thread Changelog.md Outdated

## Unreleased

Bumped MSRV to 1.63 (`libc` crate requires it).
Copy link
Copy Markdown
Author

@afeistel afeistel Dec 19, 2024

Choose a reason for hiding this comment

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

yes, I to forgot actually change the version in Cargo.toml and only wrote it in the changelog

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