Skip to content

Convert buffer to slice so user doesn't need unsafe #1

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

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

tgross35
Copy link
Contributor

Wasn't sure if there is a reason it isn't like this already, but it's nice to save the step on the user end

Copy link
Member

@Yatekii Yatekii left a comment

Choose a reason for hiding this comment

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

Thanks! :)
I think it might have been chose to appease to a specific flash interface (rpi2040 is my guess) which requires a pointer. But I think generally a slice is nicer :)

I added a minor nit ;)

@tgross35
Copy link
Contributor Author

Thanks! :) I think it might have been chose to appease to a specific flash interface (rpi2040 is my guess) which requires a pointer. But I think generally a slice is nicer :)

Ah, makes sense. .as_ptr() would work for those cases I suppose

I added a minor nit ;)

All set!

Copy link
Member

@Yatekii Yatekii left a comment

Choose a reason for hiding this comment

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

Thank you!

@Yatekii Yatekii merged commit 3b4fc12 into probe-rs:master Jan 31, 2023
@tgross35
Copy link
Contributor Author

Thanks!

@tgross35 tgross35 deleted the patch-1 branch January 31, 2023 20:03
tgross35 added a commit to tgross35/flash-algorithm-template that referenced this pull request Jan 31, 2023
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.

2 participants