mirror of https://github.com/rwf2/Rocket.git
Implement 'Clone' for all URI types.
This commit is contained in:
parent
1da506ea5d
commit
8172f748b3
|
@ -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>,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>),
|
||||
|
|
Loading…
Reference in New Issue