Impl From<String> for Link
This commit is contained in:
parent
749f08ca66
commit
ee53a28c9a
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,14 @@ use url::Url;
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct Link(String);
|
||||
|
||||
impl From<String> for Link {
|
||||
|
||||
fn from(s: String) -> Link {
|
||||
Link(s)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Deref for Link {
|
||||
type Target = String;
|
||||
|
||||
|
|
Loading…
Reference in a new issue