Skip to content

layout/script/fonts: Implement size_hint for iterator if easy - #46437

Merged
jdm merged 1 commit into
servo:mainfrom
Narfinger:layout-size-hint
Jul 14, 2026
Merged

jdm merged 1 commit into
servo:mainfrom
Narfinger:layout-size-hint

Conversation

@Narfinger

Copy link
Copy Markdown
Contributor

This implements size_hint for structs that impl Iterator if it is reasonably easy to get the size. This allows the compiler to optimize if these structs are collected into an array.

Testing: This does not need the test as per the documentation even "incorrect" size_hints are correct.

Signed-off-by: Narfinger <[email protected]>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 10, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 14, 2026
@jdm
jdm added this pull request to the merge queue Jul 14, 2026
@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 Jul 14, 2026
Merged via the queue into servo:main with commit ef9bf46 Jul 14, 2026
34 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 Jul 14, 2026
@Narfinger
Narfinger deleted the layout-size-hint branch July 15, 2026 07:21
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