Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8172f748b32c79f980020d7dabdff22ee131c46f
parent 1da506ea5d8cd842380982b475ccf74c63211917
Author: Tal <talg@cs.stanford.edu>
Date:   Fri, 31 Aug 2018 14:15:45 -0700

Implement 'Clone' for all URI types.

Diffstat:
Mcore/http/src/uri/absolute.rs | 2+-
Mcore/http/src/uri/authority.rs | 4++--
Mcore/http/src/uri/uri.rs | 2+-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/http/src/uri/absolute.rs b/core/http/src/uri/absolute.rs @@ -21,7 +21,7 @@ use uri::{Authority, Origin, Error, as_utf8_unchecked}; /// /// The scheme part of the absolute URI and at least one of authority or origin /// are required. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Absolute<'a> { source: Option<Cow<'a, str>>, scheme: IndexedStr<'a>, diff --git a/core/http/src/uri/authority.rs b/core/http/src/uri/authority.rs @@ -19,7 +19,7 @@ use uri::{as_utf8_unchecked, Error}; /// ``` /// /// Only the host part of the URI is required. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Authority<'a> { source: Option<Cow<'a, str>>, user_info: Option<IndexedStr<'a>>, @@ -27,7 +27,7 @@ pub struct Authority<'a> { port: Option<u16>, } -#[derive(Debug)] +#[derive(Debug, Clone)] crate enum Host<T> { Bracketed(T), Raw(T) diff --git a/core/http/src/uri/uri.rs b/core/http/src/uri/uri.rs @@ -39,7 +39,7 @@ use uri::{Origin, Authority, Absolute, Error}; /// This type also provides the following percent encoding/decoding helper /// methods: [`Uri::percent_encode`], [`Uri::percent_decode`], and /// [`Uri::percent_decode_lossy`]. -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub enum Uri<'a> { /// An [`Origin`] URI. Origin(Origin<'a>),