Skip to content

internal: add safety comment in conversions/bytes.rs - #6256

Merged
Tpt merged 1 commit into
PyO3:mainfrom
xavierforge:docs/safety-comments-bytes
Jul 28, 2026
Merged

internal: add safety comment in conversions/bytes.rs#6256
Tpt merged 1 commit into
PyO3:mainfrom
xavierforge:docs/safety-comments-bytes

Conversation

@xavierforge

Copy link
Copy Markdown
Contributor

Part of #5487

Removes the #![allow(clippy::undocumented_unsafe_blocks)] exemption from src/conversions/bytes.rs and adds a // SAFETY: comment for the file's only unsafe block (a test that mutates a bytearray via as_bytes_mut() to verify the extracted Bytes is an independent copy).

As @davidhewitt suggested in the issue thread, this PR is kept to a single file.

@Tpt

Tpt commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

thanks!

@Tpt
Tpt added this pull request to the merge queue Jul 28, 2026
Merged via the queue into PyO3:main with commit ccd4f07 Jul 28, 2026
50 checks passed
@xavierforge
xavierforge deleted the docs/safety-comments-bytes branch July 28, 2026 13:46
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