Skip to content

Remove StaticXBuffer, make XBuffer impls require static. #13

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 21, 2022

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Mar 20, 2021

Fixes #10

@Dirbaio Dirbaio requested a review from a team as a code owner March 20, 2021 00:07
@thalesfragoso
Copy link
Member

You probably want to update the crate's documentation as well.

@thalesfragoso thalesfragoso mentioned this pull request Apr 4, 2021
@Sh3Rm4n
Copy link

Sh3Rm4n commented Jun 21, 2021

ping :)

andrewgazelka added a commit to andrewgazelka/embedded-dma that referenced this pull request Nov 17, 2021
- Fixes rust-embedded#17
- Fixes rust-embedded#10
- This is essentially a copy of rust-embedded#13 but with the documentation change
  requirements that were never made. Since the PR has been stale since
  March, I found it fair to make another PR.
andrewgazelka added a commit to andrewgazelka/embedded-dma that referenced this pull request Nov 17, 2021
- Fixes rust-embedded#17
- Fixes rust-embedded#10
- This is essentially a copy of rust-embedded#13 but with the documentation change
  requirements that were never made. Since the PR has been stale since
  March, I found it fair to make another PR.
bors bot added a commit that referenced this pull request Jan 21, 2022
19: Remove static {read,write} buffers r=eldruin a=andrewgazelka

- Fixes #17
- Fixes #10
- This is essentially a copy of #13 but with the documentation change requirements that were never made. Since the mentioned PR has been stale since March, I found it fair to make another PR.

I am potentially concerned regarding a use case for non-static buffers in the previous docs in the embedded-dma:
> The reason we don't require `'static` in the traits themselves is because it would block implementations that can deal with stack allocated buffers, like APIs that use closures to prevent memory corruption.

Can someone provide an example of an API that use closures to prevent memory corruption? If closures have a valid use case, #18 might be a better option.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Co-authored-by: Andrew Gazelka <andrew.gazelka@gmail.com>
@bors bors bot merged commit 24f7f09 into rust-embedded:master Jan 21, 2022
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.

Rename StaticXXBuffer to XXBuffer
3 participants