Skip to content

Clean up some unsafe code introduced by #202 #253

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Aug 1, 2020

Although I haven't checked these exact functions, a simple clone seems to be enough to elide the bounds checks: https://godbolt.org/z/a1jb4h (access taken directly from the issue).

@bugadani bugadani requested a review from a team as a code owner August 1, 2020 17:50
@rust-highfive
Copy link

r? @adamgreig

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Aug 1, 2020
@bugadani
Copy link
Contributor Author

bugadani commented Aug 1, 2020

Actually, deriving Copy along with clone messes things up: https://godbolt.org/z/zhYfEs

@bugadani bugadani closed this Aug 1, 2020
@bugadani bugadani deleted the cleanup branch August 30, 2020 08:04
adamgreig pushed a commit that referenced this pull request Jan 12, 2022
257: Changed Hardfault's and DefaultHander's default implementations to panic r=adamgreig a=korken89

From the discussions in #253 I started a PR with the proposed change.

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants