From bf780589af6e778566c5c5afa87b869b14ac5f66 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 13 Feb 2016 01:17:34 -0500 Subject: [PATCH 1/2] Change return type of password_mut to Option<&mut Option> --- src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index be81b139..b105e6f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -736,10 +736,11 @@ impl Url { scheme_data.password.as_ref().map(|password| password as &str)) } - /// If the URL is in a *relative scheme*, return a mutable reference to its password, if any. + /// If the URL is in a *relative scheme*, return a mutable reference to its password field, + /// which is of type Option. #[inline] - pub fn password_mut(&mut self) -> Option<&mut String> { - self.relative_scheme_data_mut().and_then(|scheme_data| scheme_data.password.as_mut()) + pub fn password_mut(&mut self) -> Option<&mut Option> { + self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.password) } /// Percent-decode the URL’s password, if any. From afa4a43d584ae115733a45a4a0e5dbe590e573de Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 13 Feb 2016 01:17:52 -0500 Subject: [PATCH 2/2] Bump version to 0.6.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 88336c33..ca1fd0d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "url" -version = "0.5.5" +version = "0.6.0" authors = [ "Simon Sapin " ] description = "URL library for Rust, based on the WHATWG URL Standard"