Unverified Commit ddf1421b authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

allow parse_url functions to be unused (#2071)

parent 6beec943
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ pub(crate) struct Url<'a> {
    raw: &'a str,
}

// individual methods on parse_url might not be used (although the [`parse_url`] itself _MUST_ be used
// since stdlib functions are pulled into crate lazily)
#[allow(unused)]
impl<'a> Url<'a> {
    pub(crate) fn is_ip(&self) -> bool {
        matches!(self.url.host(), Some(Host::Ipv4(_) | Host::Ipv6(_)))