diff options
| author | Jeremy Stucki <jeremy@myelin.ch> | 2019-06-21 17:46:41 +0200 |
|---|---|---|
| committer | Jeremy Stucki <stucki.jeremy@gmail.com> | 2019-07-03 10:00:23 +0200 |
| commit | 87e8613fd41e7a4237a146cbe49835bb88295df6 (patch) | |
| tree | 830a58d6762de2f51b9bb81ec8375b4c1419cd7c /src/libsyntax/attr | |
| parent | 8301de16dafc81a3b5d94aa0707ad83bdb56a599 (diff) | |
| download | rust-87e8613fd41e7a4237a146cbe49835bb88295df6.tar.gz rust-87e8613fd41e7a4237a146cbe49835bb88295df6.zip | |
Remove needless lifetimes
Diffstat (limited to 'src/libsyntax/attr')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 436620ae729..453b6ebf3c4 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -440,12 +440,12 @@ pub fn contains_name(attrs: &[Attribute], name: Symbol) -> bool { }) } -pub fn find_by_name<'a>(attrs: &'a [Attribute], name: Symbol) -> Option<&'a Attribute> { +pub fn find_by_name(attrs: &[Attribute], name: Symbol) -> Option<&Attribute> { attrs.iter().find(|attr| attr.check_name(name)) } -pub fn filter_by_name<'a>(attrs: &'a [Attribute], name: Symbol) - -> impl Iterator<Item = &'a Attribute> { +pub fn filter_by_name(attrs: &[Attribute], name: Symbol) + -> impl Iterator<Item=&Attribute> { attrs.iter().filter(move |attr| attr.check_name(name)) } |
