Introduce unstable, incomplete WASM support
This commit is contained in:
@@ -37,14 +37,16 @@ impl<'a> PolyfillTryInto for &'a String {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn expect_uri(url: &Url) -> hyper::Uri {
|
||||
url.as_str()
|
||||
.parse()
|
||||
.expect("a parsed Url should always be a valid Uri")
|
||||
}
|
||||
if_hyper! {
|
||||
pub(crate) fn expect_uri(url: &Url) -> http::Uri {
|
||||
url.as_str()
|
||||
.parse()
|
||||
.expect("a parsed Url should always be a valid Uri")
|
||||
}
|
||||
|
||||
pub(crate) fn try_uri(url: &Url) -> Option<hyper::Uri> {
|
||||
url.as_str().parse().ok()
|
||||
pub(crate) fn try_uri(url: &Url) -> Option<http::Uri> {
|
||||
url.as_str().parse().ok()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user