docs(interner): add code examples to boa_interner public API#4724
Merged
jedel1043 merged 6 commits intoboa-dev:mainfrom Feb 28, 2026
Merged
docs(interner): add code examples to boa_interner public API#4724jedel1043 merged 6 commits intoboa-dev:mainfrom
jedel1043 merged 6 commits intoboa-dev:mainfrom
Conversation
Test262 conformance changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4724 +/- ##
==========================================
+ Coverage 47.24% 57.10% +9.85%
==========================================
Files 476 553 +77
Lines 46892 60603 +13711
==========================================
+ Hits 22154 34606 +12452
- Misses 24738 25997 +1259 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jedel1043
reviewed
Feb 27, 2026
Contributor
Author
thanks @jedel1043 tbh i enjoyed this because it was my first PR i raised in boa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2337
Added
# Examplesdoc sections to all 14 public functions incore/interner/src/lib.rs, coveringInternerandJSInternedStrRef.PR #3141 added unit tests but left the public API without doc examples.
This PR completes the original intent of the issue.
Notable considerations:
is_empty()example reflects that a new interner is never empty due topre-loaded
COMMON_STRINGS_UTF8len()usesinitial_lenpattern for the same reasoninto_common()defines a localJsStringenum since no standard typeimplements both
From<&str>andFrom<&[u16]>All 14 doctests pass (
cargo +nightly test --doc).