aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-09-27 14:24:26 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-09-27 14:24:26 -0700
commit7f7d0d18ad53092e6eefc064d9f53c53fc231e73 (patch)
treef9789a5784d7627f6daddb0e3d4632ba602fd5af /src/lib.rs
parent59eb71aa8addc7310514c039b8b29453d9dbb766 (diff)
No need to use try_from() when setting parts of a URI
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 61936fe..29e2c47 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1027,7 +1027,7 @@ mod tests {
assert!(uri.is_ok());
let mut uri = uri.unwrap();
assert_eq!(None, uri.fragment());
- uri.set_fragment(uriparse::Fragment::try_from("").ok()).unwrap();
+ uri.set_fragment(Some("")).unwrap();
assert_eq!(
Some(&uriparse::Fragment::try_from("").unwrap()),
uri.fragment()
@@ -1053,7 +1053,7 @@ mod tests {
assert!(uri.is_ok());
let mut uri = uri.unwrap();
assert_eq!(None, uri.query());
- uri.set_query(uriparse::Query::try_from("").ok()).unwrap();
+ uri.set_query(Some("")).unwrap();
assert_eq!(
Some(&uriparse::Query::try_from("").unwrap()),
uri.query()