Leverage Rust 1.78-1.84 APIs #4107
Merged
Madoshakalaka merged 7 commits intomasterfrom Apr 4, 2026
Merged
Conversation
Member
Author
|
Breaking public API change: |
Benchmark - coreYew MasterPull Request |
|
Visit the preview URL for this PR (updated for commit 8b3b25e): https://yew-rs-api--pr4107-refactor-leverage-ne-th4cytut.web.app (expires Sat, 11 Apr 2026 10:53:58 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Size ComparisonDetails
|
Benchmark - SSRYew MasterDetails
Pull RequestDetails
|
Member
Author
|
6d7b8f2 is a bug fix worth mentioning in the changelog |
Member
Author
|
2a6a575 is a breaking change but requires no action from most users I imagine. Because likely nobody constructs |
2a6a575 to
81eac3b
Compare
- Use Option::is_none_or (1.82) replacing match/map+unwrap_or patterns
- Use inline const {} blocks (1.79) in VList::deref and thread_local! inits
- Remove stale #[allow(ambiguous_wide_pointer_comparisons)] on Rc::ptr_eq (1.84)
- Remove #[allow(clippy::incompatible_msrv)] and PanicInfo alias, use PanicHookInfo directly (1.81)
- Remove redundant prelude imports (size_of, FromIterator, PartialEq)
Add const fn new() to FifoQueue, TopologicalQueue, and Scheduler so
the SCHEDULER thread_local can use const {} initialization, eliminating
the lazy-init check on every access to this hot-path global.
…essions Convert active lint suppressions to #[expect] so the compiler warns if they become unnecessary. Remove 7 stale #[allow] attributes that were never firing (too_many_arguments on <7-param functions, cognitive_complexity, large_enum_variant, let_with_type_underscore, missing_debug_implementations on private types, and missing_docs on doc-hidden items).
Replace .finish() with .finish_non_exhaustive() and f.write_str("Type")
with f.debug_struct("Type").finish_non_exhaustive() across all Debug
implementations that intentionally hide fields. This produces more
accurate debug output (e.g. "Type { .. }" instead of "Type {}").
Also fixes a naming bug in WorkerSpawner's Debug impl which incorrectly
printed "WorkerScope<_>" instead of "WorkerSpawner<_>".
BREAKING CHANGE: removed the `Static` variant from the public `AttributeOrProperty` enum.
81eac3b to
8b3b25e
Compare
shan-shaji
pushed a commit
to shan-shaji/yew
that referenced
this pull request
Apr 19, 2026
* refactor: leverage some Rust 1.78-1.84 APIs
- Use Option::is_none_or (1.82) replacing match/map+unwrap_or patterns
- Use inline const {} blocks (1.79) in VList::deref and thread_local! inits
- Remove stale #[allow(ambiguous_wide_pointer_comparisons)] on Rc::ptr_eq (1.84)
- Remove #[allow(clippy::incompatible_msrv)] and PanicInfo alias, use PanicHookInfo directly (1.81)
- Remove redundant prelude imports (size_of, FromIterator, PartialEq)
* refactor: const-init SCHEDULER thread_local via const fn constructors
Add const fn new() to FifoQueue, TopologicalQueue, and Scheduler so
the SCHEDULER thread_local can use const {} initialization, eliminating
the lazy-init check on every access to this hot-path global.
* refactor: replace #[allow] with #[expect] and remove stale lint suppressions
Convert active lint suppressions to #[expect] so the compiler warns if
they become unnecessary. Remove 7 stale #[allow] attributes that were
never firing (too_many_arguments on <7-param functions, cognitive_complexity,
large_enum_variant, let_with_type_underscore, missing_debug_implementations
on private types, and missing_docs on doc-hidden items).
* fix: preserve #[expect] attributes in derive(Properties) macro expansion
* refactor: use finish_non_exhaustive() in Debug impls with hidden fields
Replace .finish() with .finish_non_exhaustive() and f.write_str("Type")
with f.debug_struct("Type").finish_non_exhaustive() across all Debug
implementations that intentionally hide fields. This produces more
accurate debug output (e.g. "Type { .. }" instead of "Type {}").
* refactor: use associated type bounds to simplify where clauses
* refactor!: remove AttributeOrProperty::Static workaround for Rust <1.72
BREAKING CHANGE: removed the `Static` variant from the public
`AttributeOrProperty` enum.
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.
Description
this is a follow up to #3900, which bumped the MSRV but didn't fully utilize the new rust APIs.
Checklist