Skip to content

Conversation

@Narfinger
Copy link
Contributor

This implements efficient methods for as_bytes, eq_ascii, is_ascii and to_jsval.
Tests were added for as_bytes. Additionally, BytesView now has an internal type to make sure nobody can construct it.

Testing: New unit tests were added and some old ones covered the new functions.

@Narfinger Narfinger requested a review from gterzian as a code owner October 30, 2025 10:14
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 30, 2025
@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 30, 2025
to_jsval for DOMString based on the bytes.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@Narfinger Narfinger force-pushed the lazydomstring-improvements4 branch from 23f9143 to 02f5fa2 Compare November 3, 2025 09:47
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 3, 2025
@Narfinger
Copy link
Contributor Author

It seems that eq_ascii was not necessary anymore so I removed it completely. The PartialEq was already doing a fast compare if it was ascii.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 3, 2025
Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
@Narfinger Narfinger force-pushed the lazydomstring-improvements4 branch from 02f5fa2 to 3cfb021 Compare November 3, 2025 16:31
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 3, 2025
@jdm jdm added this pull request to the merge queue Nov 3, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 3, 2025
Merged via the queue into servo:main with commit 95c8b42 Nov 3, 2025
35 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 3, 2025
@Narfinger Narfinger deleted the lazydomstring-improvements4 branch November 4, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants