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

An attempt to make clippy and rustc complain less #121

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

timotheyca
Copy link

@timotheyca timotheyca 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

@timotheyca
Copy link
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.

@@ -4,10 +4,6 @@ This is the changelog, summarising changes in each version

Minor changes may be ommited, as well as improvements to documentation.

## Unreleased

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

@timotheyca timotheyca 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