Impl From<String> for Link

This commit is contained in:
Matthias Beyer 2016-07-08 16:40:09 +02:00
parent 749f08ca66
commit ee53a28c9a

View file

@ -7,6 +7,14 @@ use url::Url;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Link(String); pub struct Link(String);
impl From<String> for Link {
fn from(s: String) -> Link {
Link(s)
}
}
impl Deref for Link { impl Deref for Link {
type Target = String; type Target = String;