servo / rust-url

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

Resolves #844 by returning `Ok(())` if the port, username or password is empty #845

Open chanced opened 1 year ago

chanced commented 1 year ago

resolves #844 by checking for a value before returning Err(()) in set_port, set_username and set_password.

chanced commented 1 year ago

This pull request is lacking in tests at the moment. I'll add them if ya'll are interested in it.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.05% :warning:

Comparison is base (0e25146) 82.44% compared to head (b4ff992) 82.39%. Report is 22 commits behind head on master.

:exclamation: Current head b4ff992 differs from pull request most recent head 941dade. Consider uploading reports for the commit 941dade to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #845 +/- ## ========================================== - Coverage 82.44% 82.39% -0.05% ========================================== Files 20 20 Lines 3343 3352 +9 ========================================== + Hits 2756 2762 +6 - Misses 587 590 +3 ``` | [Files Changed](https://app.codecov.io/gh/servo/rust-url/pull/845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo) | Coverage Δ | | |---|---|---| | [url/src/lib.rs](https://app.codecov.io/gh/servo/rust-url/pull/845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo#diff-dXJsL3NyYy9saWIucnM=) | `75.83% <50.00%> (-0.24%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/servo/rust-url/pull/845/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=servo)

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