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

address types improvements, clippy bullshit #509

Merged
merged 9 commits into from
Jan 11, 2025
Merged

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Jan 11, 2025

No description provided.

hawkw added 8 commits January 11, 2025 10:59
This changes the `VAddr` and `PAddr` types to use
`ptr::expose_provenance` and `ptr::with_exposed_provenance` when
converting to/from raw pointers. Hopefully, this will make things a
little bit less UB.

Fixes #366, more or less.
This is just a bit more convenient.
This changes the `VAddr::offset` and `PAddr::offset` methods to takee an
`isize` offset instead of an `i32` offset. I don't know why I used `i32`
here, that was stupid.

Fixes #507
`mycelium-pci` uses `bool::then_some` which was stabilized in
Rust 1.62.0, but advertises a MSRV of 1.61.0. Whoops!

Thanks to clippy for figuring that out, really cool new lint!
Mostly, but not entirely, `clippy::needless_lifetimes`.
@hawkw hawkw force-pushed the eliza/addr-i-hardly-knew-er branch from 2b16d98 to 60e089d Compare January 11, 2025 19:02
@hawkw hawkw merged commit e43cad5 into main Jan 11, 2025
1 check passed
hawkw added a commit that referenced this pull request Jan 11, 2025
This changes the `VAddr` and `PAddr` types to use
`ptr::expose_provenance` and `ptr::with_exposed_provenance` when
converting to/from raw pointers. Hopefully, this will make things a
little bit less UB.

Fixes #366, more or less.
@hawkw hawkw deleted the eliza/addr-i-hardly-knew-er branch January 11, 2025 19:14
hawkw added a commit that referenced this pull request Jan 11, 2025
This is just a bit more convenient.
hawkw added a commit that referenced this pull request Jan 11, 2025
This changes the `VAddr::offset` and `PAddr::offset` methods to takee an
`isize` offset instead of an `i32` offset. I don't know why I used `i32`
here, that was stupid.

Fixes #507
hawkw added a commit that referenced this pull request Jan 11, 2025
hawkw added a commit that referenced this pull request Jan 11, 2025
hawkw added a commit that referenced this pull request Jan 11, 2025
`mycelium-pci` uses `bool::then_some` which was stabilized in
Rust 1.62.0, but advertises a MSRV of 1.61.0. Whoops!

Thanks to clippy for figuring that out, really cool new lint!
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