-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix indexmap compatibility for yew 0.21.0 (#3659) #3677
fix: Fix indexmap compatibility for yew 0.21.0 (#3659) #3677
Conversation
Benchmark - coreYew Master
Pull Request
|
Visit the preview URL for this PR (updated for commit 5abbf8a): https://yew-rs-api--pr3677-fix-trait-bound-erro-jcsx603v.web.app (expires Sun, 14 Jul 2024 08:41:18 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Size Comparison
✅ None of the examples has changed their size significantly. |
Benchmark - SSRYew Master
Pull Request
|
Incidentally, CI is making errors in areas unrelated to my changes, but I have not done anything special about this since it is not causally related to this issue. |
This error is a result of implicit-clone, a daughter crate of Yew, trying to support both |
@its-the-shrimp |
Description
Fix conversion from IndexMap to IMap in IntoPropValue implementation
This PR addresses an error in the IntoPropValue implementation for IndexMap to IMap conversion. The original code used
IMap::from(self)
, which failed because there's no directFrom
implementation forIMap
fromindexmap::IndexMap
.Changes made:
IMap::from(self)
withIMap::from_iter(self)
Rationale:
from_iter
utilizes theFromIterator
trait to construct anIMap
from an iterator.IndexMap
implementsIntoIterator
, allowing it to be used withfrom_iter
.From
implementation betweenIMap
andIndexMap
.The change resolves the compilation error and provides a more flexible conversion method using existing trait implementations.
This change may not directly resolve the Issue, but at least it resolved a similar error that was occurring in my environment
I added yew to the dependencies package,
I added yew to the dependencies package, and ran into the error in this Issue when I did a simple HTML build to see how it worked.
Here is the code of main.rs at that time.
addresses #3659
Checklist