mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-19 07:59:05 +00:00
Implement 'From<Cow<str>>' for 'Uri'.
This commit is contained in:
parent
23093a33b8
commit
cced491ec9
@ -312,6 +312,13 @@ impl<'a> From<&'a str> for Uri<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<Cow<'a, str>> for Uri<'a> {
|
||||
#[inline(always)]
|
||||
fn from(uri: Cow<'a, str>) -> Uri<'a> {
|
||||
Uri::new(uri)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for Uri<'static> {
|
||||
#[inline(always)]
|
||||
fn from(uri: String) -> Uri<'static> {
|
||||
|
Loading…
Reference in New Issue
Block a user