Skip to content

Commit 5bb6960

Browse files
authored
Merge pull request #1075 from dimo414/master
Remove a few unnecessary lifetimes
2 parents 57d529b + 9d86391 commit 5bb6960

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/value/from.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl From<String> for Value {
9191
}
9292
}
9393

94-
impl<'a> From<&'a str> for Value {
94+
impl From<&str> for Value {
9595
/// Convert string slice to `Value`
9696
///
9797
/// # Examples
@@ -181,7 +181,7 @@ impl<T: Into<Value>> From<Vec<T>> for Value {
181181
}
182182
}
183183

184-
impl<'a, T: Clone + Into<Value>> From<&'a [T]> for Value {
184+
impl<T: Clone + Into<Value>> From<&[T]> for Value {
185185
/// Convert a slice to `Value`
186186
///
187187
/// # Examples
@@ -192,7 +192,7 @@ impl<'a, T: Clone + Into<Value>> From<&'a [T]> for Value {
192192
/// let v: &[&str] = &["lorem", "ipsum", "dolor"];
193193
/// let x: Value = v.into();
194194
/// ```
195-
fn from(f: &'a [T]) -> Self {
195+
fn from(f: &[T]) -> Self {
196196
Value::Array(f.iter().cloned().map(Into::into).collect())
197197
}
198198
}

src/value/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl Index for String {
116116
}
117117
}
118118

119-
impl<'a, T> Index for &'a T
119+
impl<T> Index for &T
120120
where
121121
T: ?Sized + Index,
122122
{

src/value/partial_eq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl PartialEq<str> for Value {
3434
}
3535
}
3636

37-
impl<'a> PartialEq<&'a str> for Value {
37+
impl PartialEq<&str> for Value {
3838
fn eq(&self, other: &&str) -> bool {
3939
eq_str(self, *other)
4040
}
@@ -46,7 +46,7 @@ impl PartialEq<Value> for str {
4646
}
4747
}
4848

49-
impl<'a> PartialEq<Value> for &'a str {
49+
impl PartialEq<Value> for &str {
5050
fn eq(&self, other: &Value) -> bool {
5151
eq_str(other, *self)
5252
}

0 commit comments

Comments
 (0)