Remove unnecessary lifetime specifiers

This commit is contained in:
Tobie Morgan Hitchcock 2022-05-25 10:42:10 +01:00
parent 44df5a8621
commit ea525648ae
8 changed files with 9 additions and 9 deletions

View file

@ -32,7 +32,7 @@ impl From<DateTime<Utc>> for Datetime {
}
}
impl<'a> From<&'a str> for Datetime {
impl From<&str> for Datetime {
fn from(s: &str) -> Self {
match datetime_raw(s) {
Ok((_, v)) => v,

View file

@ -37,7 +37,7 @@ impl From<String> for Duration {
}
}
impl<'a> From<&'a str> for Duration {
impl From<&str> for Duration {
fn from(s: &str) -> Self {
match duration(s) {
Ok((_, v)) => v,

View file

@ -30,13 +30,13 @@ impl From<String> for Ident {
}
}
impl<'a> From<&'a str> for Ident {
impl From<&str> for Ident {
fn from(i: &str) -> Ident {
Ident(String::from(i))
}
}
impl<'a> From<&'a String> for Ident {
impl From<&String> for Ident {
fn from(i: &String) -> Ident {
Ident(String::from(i))
}

View file

@ -106,7 +106,7 @@ impl From<f64> for Number {
}
}
impl<'a> From<&'a str> for Number {
impl From<&str> for Number {
fn from(s: &str) -> Self {
Number::Decimal(BigDecimal::from_str(s).unwrap_or_default())
}

View file

@ -11,7 +11,7 @@ use std::str;
#[derive(Clone, Debug, Default, Eq, Ord, PartialEq, PartialOrd, Serialize, Deserialize)]
pub struct Regex(String);
impl<'a> From<&'a str> for Regex {
impl From<&str> for Regex {
fn from(r: &str) -> Regex {
Regex(r.replace("\\/", "/"))
}

View file

@ -32,7 +32,7 @@ impl From<String> for Script {
}
}
impl<'a> From<&'a str> for Script {
impl From<&str> for Script {
fn from(s: &str) -> Self {
Script(String::from(s))
}

View file

@ -27,7 +27,7 @@ impl From<String> for Strand {
}
}
impl<'a> From<&'a str> for Strand {
impl From<&str> for Strand {
fn from(s: &str) -> Self {
Strand(String::from(s))
}

View file

@ -312,7 +312,7 @@ impl From<String> for Value {
}
}
impl<'a> From<&'a str> for Value {
impl From<&str> for Value {
fn from(v: &str) -> Self {
Value::Strand(Strand::from(v))
}