Skip to content

Conversation

@its-the-shrimp
Copy link
Contributor

Description

The logic for rewriting the function signature of the hook is rewritten to emit a function that doesn't trigger the clippy::multiple_bound_locations lint

Fixes #3708

Checklist

  • I have reviewed my own code
  • I have added tests

@github-actions
Copy link

github-actions bot commented Feb 20, 2025

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)

✅ None of the examples has changed their size significantly.

@its-the-shrimp its-the-shrimp force-pushed the hook-macro-fix-clippy-lint branch from 7f1417a to b40b51c Compare February 20, 2025 00:15
@github-actions
Copy link

github-actions bot commented Feb 20, 2025

Visit the preview URL for this PR (updated for commit c2f164f):

https://yew-rs-api--pr3803-hook-macro-fix-clipp-zdkgf4wl.web.app

(expires Wed, 05 Mar 2025 13:07:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Feb 20, 2025

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 310.504 314.895 311.514 1.413
Hello World 10 478.899 492.404 484.112 5.314
Function Router 10 1599.127 1607.515 1603.037 2.656
Concurrent Task 10 1006.034 1007.327 1006.687 0.365
Many Providers 10 1128.770 1167.120 1147.916 11.269

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 310.681 311.943 311.081 0.455
Hello World 10 468.326 490.228 473.502 7.783
Function Router 10 1626.144 1637.630 1631.465 3.833
Concurrent Task 10 1005.718 1007.570 1006.641 0.528
Many Providers 10 1130.888 1173.566 1147.602 14.140

@its-the-shrimp its-the-shrimp force-pushed the hook-macro-fix-clippy-lint branch 3 times, most recently from 0869533 to ccf01f5 Compare February 20, 2025 20:52
This is achieved by reworking the logic for rewriting the function signature of the hook.
@its-the-shrimp its-the-shrimp force-pushed the hook-macro-fix-clippy-lint branch from ccf01f5 to c2f164f Compare February 26, 2025 13:05
Copy link
Member

@Madoshakalaka Madoshakalaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Madoshakalaka Madoshakalaka merged commit 48cdc3d into yewstack:master Feb 26, 2025
24 checks passed
Madoshakalaka pushed a commit that referenced this pull request Mar 2, 2025
#3803)

This is achieved by reworking the logic for rewriting the function signature of the hook.
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.

generic #[hook] function gives bound is defined in more than one place warning

2 participants