diff options
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/authority.rs | 4 | ||||
-rw-r--r-- | src/uri.rs | 10 |
3 files changed, 8 insertions, 8 deletions
@@ -1,6 +1,6 @@ [package] name = "rhymuri" -version = "1.0.1" +version = "1.0.2" description = "Implementation of IETF RFC 3986, Uniform Resource Identifier (URI)" authors = ["Richard Walters <rwalters@digitalstirling.com>"] edition = "2018" diff --git a/src/authority.rs b/src/authority.rs index 18d86fa..bde7a06 100644 --- a/src/authority.rs +++ b/src/authority.rs @@ -20,7 +20,7 @@ use super::validate_ipv6_address::validate_ipv6_address; /// # extern crate rhymuri; /// use rhymuri::Authority; /// -/// # fn test() -> Result<(), rhymuri::Error> { +/// # fn main() -> Result<(), rhymuri::Error> { /// let authority = Authority::parse("nobody@www.example.com:8080")?; /// assert_eq!(Some("nobody".as_bytes()), authority.userinfo()); /// assert_eq!("www.example.com".as_bytes(), authority.host()); @@ -35,7 +35,7 @@ use super::validate_ipv6_address::validate_ipv6_address; /// # extern crate rhymuri; /// use rhymuri::Authority; /// -/// # fn test() -> Result<(), rhymuri::Error> { +/// # fn main() -> Result<(), rhymuri::Error> { /// let mut authority = Authority::default(); /// authority.set_userinfo(Some("nobody").map(Into::into)); /// authority.set_host("www.example.com"); @@ -39,7 +39,7 @@ use super::character_classes::{ /// # extern crate rhymuri; /// use rhymuri::Uri; /// -/// # fn test() -> Result<(), rhymuri::Error> { +/// # fn main() -> Result<(), rhymuri::Error> { /// let uri = Uri::parse("http://www.example.com/foo?bar#baz")?; /// let authority = uri.authority().unwrap(); /// assert_eq!("www.example.com".as_bytes(), authority.host()); @@ -229,7 +229,7 @@ impl Uri { /// # extern crate rhymuri; /// use rhymuri::Uri; /// - /// # fn test() -> Result<(), rhymuri::Error> { + /// # fn main() -> Result<(), rhymuri::Error> { /// let mut uri = Uri::parse("/a/b/c/./../../g")?; /// uri.normalize(); /// assert_eq!("/a/g", uri.path_to_string()?); @@ -489,11 +489,11 @@ impl Uri { /// # extern crate rhymuri; /// use rhymuri::Uri; /// - /// # fn test() -> Result<(), rhymuri::Error> { + /// # fn main() -> Result<(), rhymuri::Error> { /// let base = Uri::parse("http://a/b/c/d;p?q")?; /// let relative_reference = Uri::parse("g;x?y#s")?; /// let resolved = base.resolve(&relative_reference); - /// assert_eq!("http://a/b/c/g;x?y#s", resolved.path_to_string()?); + /// assert_eq!("http://a/b/c/g;x?y#s", resolved.to_string()); /// # Ok(()) /// # } /// ``` @@ -1300,7 +1300,7 @@ mod tests { let base_uri = Uri::parse(test_vector.base_string()).unwrap(); let relative_reference_uri = Uri::parse(test_vector.relative_reference_string()).unwrap(); let expected_target_uri = Uri::parse(test_vector.target_string()).unwrap(); - let actual_target_uri = base_uri.resolve(&relative_reference_uri); + let actual_target_uri = dbg!(base_uri.resolve(&relative_reference_uri)); assert_eq!(expected_target_uri, actual_target_uri); } } |