servo / rust-url

URL parser for Rust
https://docs.rs/url/
Apache License 2.0
1.27k stars 317 forks source link

Added #[must_use] Attributes for Configuration Options #876

Closed Redfire75369 closed 8 months ago

Redfire75369 commented 8 months ago

Resolves issues similar to https://github.com/Redfire75369/spiderfire/pull/35, where the updated ParseOptions isn't used since it is Copy.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (67fc273) 81.82% compared to head (58bdc87) 81.82%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #876 +/- ## ======================================= Coverage 81.82% 81.82% ======================================= Files 20 20 Lines 3532 3532 ======================================= Hits 2890 2890 Misses 642 642 ``` | [Files](https://app.codecov.io/gh/servo/rust-url/pull/876?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo) | Coverage Δ | | |---|---|---| | [idna/src/uts46.rs](https://app.codecov.io/gh/servo/rust-url/pull/876?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo#diff-aWRuYS9zcmMvdXRzNDYucnM=) | `94.17% <ø> (ø)` | | | [url/src/lib.rs](https://app.codecov.io/gh/servo/rust-url/pull/876?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo#diff-dXJsL3NyYy9saWIucnM=) | `75.56% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

valenting commented 8 months ago

Thank you for the fix @Redfire75369 @lucacasonato I was thinking this might be a breaking change, but I think it would only warn/break incorrect uses of the struct, so that would be OK?

lucacasonato commented 8 months ago

Yeah I agree, would only break invalid uses