Skip to content

Remove unsafe code#11

Open
basbossink wants to merge 1 commit into
JohnPeel:mainfrom
basbossink:remove-unsafe
Open

Remove unsafe code#11
basbossink wants to merge 1 commit into
JohnPeel:mainfrom
basbossink:remove-unsafe

Conversation

@basbossink
Copy link
Copy Markdown

This PR contains a trivial change to remove the unsafe block from src/lib.rs.

@JohnPeel
Copy link
Copy Markdown
Owner

JohnPeel commented May 24, 2025

You can't index str with an integer, because they are UTF-8.

(ArrayString used here, also does not give an interface to access individual bytes, as it makes the same assumptions on codepage)

error[E0277]: the type `str` cannot be indexed by `{integer}`

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.

3 participants