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

Fix abort() getting stuck when being passed a reference #67

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

clonejo
Copy link
Contributor

@clonejo clonejo commented Jan 3, 2024

ISSUE 66 - Fix abort() getting stuck when being passed a reference

Fixes #66

Description

  • It was possible to pass a reference to data_stream, instead of ownership, which the code intended.
  • Require 'static, ie. normal references cannot be passed anymore.
  • Could stop old, buggy code from compiling.

Type of change

Please select relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • not really it only stops previously broken code from compiling
  • This change requires a documentation update

Checklist

  • My code follows the contribution guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I formatted the code with cargo fmt
  • I linted my code using cargo clippy and reports no warnings
  • I have added tests that prove my fix is effective or that my feature works
    • the tests still compile
  • I have introduced no C-bindings
  • I increased or maintained the code coverage for the project, compared to the previous commit

Acceptance tests

wait for a project maintainer to fulfill this section...

  • regression test: ...

- It was possible to pass a reference to data_stream, instead of
  ownership, which the code intended.
- Require 'static, ie. normal references cannot be passed anymore.
- Could stop old, buggy code from compiling.
@veeso
Copy link
Owner

veeso commented Jan 6, 2024

Thanks for implementing this!

@veeso veeso merged commit f1ffe01 into veeso:main Jan 6, 2024
4 checks passed
@clonejo clonejo deleted the fix-stuck-abort branch January 6, 2024 21:11
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.

[BUG] - abort can be called without passing ownership to data_stream
2 participants