Skip to content

Conversation

workingjubilee
Copy link
Member

As s_name is an 8-byte array, and we check only for ASCII characters, checking for UTF-8 validity is pure overhead.

Small cleanup opportunity I noticed while poking through the code looking for old-fashioned if-let-nesting to dedent with let-chains.

As s_name is an 8-byte array, and we check only for ASCII characters,
checking for UTF-8 validity is pure overhead.
Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

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

Yeah, from_utf8 is completely unnecessary.

@ChrisDenton ChrisDenton merged commit 55369a2 into rust-lang:master Sep 26, 2025
40 checks passed
@workingjubilee workingjubilee deleted the simplify-xcoff-find-text branch September 26, 2025 17:40
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