diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-09-27 14:24:26 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-09-27 14:24:26 -0700 |
commit | 7f7d0d18ad53092e6eefc064d9f53c53fc231e73 (patch) | |
tree | f9789a5784d7627f6daddb0e3d4632ba602fd5af | |
parent | 59eb71aa8addc7310514c039b8b29453d9dbb766 (diff) |
No need to use try_from() when setting parts of a URI
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |