You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extra::url::to_str doesn't include the port, leading to an incorrect string representation of the URL.
If the port is not None, it should be tacked on after the host name with a colon before it. I don't think intelligence in omitting it for the default port of a scheme (e.g. if it's Some(~"80") with the scheme ~"http") is desirable.
(... hang on: why is port a ~str rather than a u16? Out of scope for this issue.)
Add `manual_filter` lint for `Option`
Share much of its implementation with `manual_map` and should greatly benefit from its previous feedback.
I'm sure it's possible to even more refactor both and would gladly take input on that as well as any clippy idiomatic usage, since this is my first lint addition.
I've added the lint to the complexity section for now, I don't know if every new lint needs to go in nursery first.
The matching could be expanded to more than `Some(<value>)` to lint on arbitrary struct matching inside the `Some` but I've left it like it was for `manual_map` for now. `needless_match::pat_same_as_expr` provides a more generic match example.
closerust-lang/rust-clippy#8822
changelog: Add lint [`manual_filter`] for `Option`
extra::url::to_str
doesn't include the port, leading to an incorrect string representation of the URL.If the port is not
None
, it should be tacked on after the host name with a colon before it. I don't think intelligence in omitting it for the default port of a scheme (e.g. if it'sSome(~"80")
with the scheme~"http"
) is desirable.(... hang on: why is port a
~str
rather than au16
? Out of scope for this issue.)See also chris-morgan/rust-http#16.
The text was updated successfully, but these errors were encountered: