Skip to content

Conversation

@bmoxb
Copy link

@bmoxb bmoxb commented Nov 15, 2024

There are parts of the code that depend on the implementation of U16UtfExt being correct in order to avoid undefined behaviour. Examples:

match first.borrow().utf16_needs_extra_unit() {

Some(second) => match second.borrow().utf16_needs_extra_unit() {

These call sites of the trait's methods do not defend against its implementation being incorrect. We therefore think it would be a good idea to mark the trait as unsafe to make it clear that the overall safety of the crate depends on it.

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.

1 participant