Skip to content

Conversation

felix91gr
Copy link
Contributor

@felix91gr felix91gr commented Sep 19, 2025

The original documentation had me confused for a couple of minutes. Now it should be more or less unambiguous.

changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@felix91gr
Copy link
Contributor Author

@Alexendoo lemme know if I should change something :)

Comment on lines -17 to +18
/// This avoids calling an unsafe `libc` function.
/// Currently, it also avoids calculating the length.
/// `libc::strlen` requires an unsafe block, which we don't really need if all
/// we want to know is the length of the string.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think phrase it more confidently as removing a call to an unsafe function rather than potentially removing an unsafe block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alexendoo how does something like this sound?

libc::strlen is an unsafe function, which we don't need to call if all we want to know is the length of the c-string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants