|
@@ -21,7 +21,7 @@ use std::str;
|
|
|
/// use url::Url;
|
|
/// use url::Url;
|
|
|
/// # use std::error::Error;
|
|
/// # use std::error::Error;
|
|
|
///
|
|
///
|
|
|
-/// # fn run() -> Result<(), Box<Error>> {
|
|
|
|
|
|
|
+/// # fn run() -> Result<(), Box<dyn Error>> {
|
|
|
/// let mut url = Url::parse("mailto:me@example.com")?;
|
|
/// let mut url = Url::parse("mailto:me@example.com")?;
|
|
|
/// assert!(url.path_segments_mut().is_err());
|
|
/// assert!(url.path_segments_mut().is_err());
|
|
|
///
|
|
///
|
|
@@ -80,7 +80,7 @@ impl<'a> PathSegmentsMut<'a> {
|
|
|
/// use url::Url;
|
|
/// use url::Url;
|
|
|
/// # use std::error::Error;
|
|
/// # use std::error::Error;
|
|
|
///
|
|
///
|
|
|
- /// # fn run() -> Result<(), Box<Error>> {
|
|
|
|
|
|
|
+ /// # fn run() -> Result<(), Box<dyn Error>> {
|
|
|
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
|
|
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
|
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
|
/// .clear().push("logout");
|
|
/// .clear().push("logout");
|
|
@@ -108,7 +108,7 @@ impl<'a> PathSegmentsMut<'a> {
|
|
|
/// use url::Url;
|
|
/// use url::Url;
|
|
|
/// # use std::error::Error;
|
|
/// # use std::error::Error;
|
|
|
///
|
|
///
|
|
|
- /// # fn run() -> Result<(), Box<Error>> {
|
|
|
|
|
|
|
+ /// # fn run() -> Result<(), Box<dyn Error>> {
|
|
|
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
|
|
/// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
|
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
|
/// .push("pulls");
|
|
/// .push("pulls");
|
|
@@ -177,7 +177,7 @@ impl<'a> PathSegmentsMut<'a> {
|
|
|
/// use url::Url;
|
|
/// use url::Url;
|
|
|
/// # use std::error::Error;
|
|
/// # use std::error::Error;
|
|
|
///
|
|
///
|
|
|
- /// # fn run() -> Result<(), Box<Error>> {
|
|
|
|
|
|
|
+ /// # fn run() -> Result<(), Box<dyn Error>> {
|
|
|
/// let mut url = Url::parse("https://github.com/")?;
|
|
/// let mut url = Url::parse("https://github.com/")?;
|
|
|
/// let org = "servo";
|
|
/// let org = "servo";
|
|
|
/// let repo = "rust-url";
|
|
/// let repo = "rust-url";
|
|
@@ -197,7 +197,7 @@ impl<'a> PathSegmentsMut<'a> {
|
|
|
/// use url::Url;
|
|
/// use url::Url;
|
|
|
/// # use std::error::Error;
|
|
/// # use std::error::Error;
|
|
|
///
|
|
///
|
|
|
- /// # fn run() -> Result<(), Box<Error>> {
|
|
|
|
|
|
|
+ /// # fn run() -> Result<(), Box<dyn Error>> {
|
|
|
/// let mut url = Url::parse("https://github.com/servo")?;
|
|
/// let mut url = Url::parse("https://github.com/servo")?;
|
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
/// url.path_segments_mut().map_err(|_| "cannot be base")?
|
|
|
/// .extend(&["..", "rust-url", ".", "pulls"]);
|
|
/// .extend(&["..", "rust-url", ".", "pulls"]);
|