From 9ad20d5ab3cc62f43396739761d84676c486010a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 14 Feb 2022 18:41:32 +0530 Subject: [PATCH] all: fix elided-lifetime-in-paths warnings --- crox/src/main.rs | 2 +- measureme/src/event_id.rs | 2 +- summarize/src/aggregate.rs | 4 ++-- summarize/src/analysis.rs | 2 +- summarize/src/signed_duration.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crox/src/main.rs b/crox/src/main.rs index f693505..8aa6eaa 100644 --- a/crox/src/main.rs +++ b/crox/src/main.rs @@ -120,7 +120,7 @@ fn generate_thread_to_collapsed_thread_mapping( thread_to_collapsed_thread } -fn get_args(full_event: &analyzeme::Event) -> Option> { +fn get_args(full_event: &analyzeme::Event<'_>) -> Option> { if !full_event.additional_data.is_empty() { Some( full_event diff --git a/measureme/src/event_id.rs b/measureme/src/event_id.rs index 0c361a3..ec4f5a4 100644 --- a/measureme/src/event_id.rs +++ b/measureme/src/event_id.rs @@ -83,7 +83,7 @@ impl<'p> EventIdBuilder<'p> { pub fn from_label_and_args(&self, label: StringId, args: &[StringId]) -> EventId { // Store up to 7 components on the stack: 1 label + 3 arguments + 3 argument separators - let mut parts = SmallVec::<[StringComponent; 7]>::with_capacity(1 + args.len() * 2); + let mut parts = SmallVec::<[StringComponent<'_>; 7]>::with_capacity(1 + args.len() * 2); parts.push(StringComponent::Ref(label)); diff --git a/summarize/src/aggregate.rs b/summarize/src/aggregate.rs index 80f7755..17808bf 100644 --- a/summarize/src/aggregate.rs +++ b/summarize/src/aggregate.rs @@ -322,7 +322,7 @@ impl<'a, I: BackwardsIterator>>>> Bac match self.sample_intervals_per_profile.get_mut(0)?.next_back() { Some(interval) => { let first_duration = interval.duration(); - let descriptions = interval.map_event(WithParent::::from); + let descriptions = interval.map_event(WithParent::>::from); // FIXME(eddyb) maybe extract this part into an `Iterator` impl? but it // would be hard to return an interable that doesn't allocate nor borrow @@ -344,7 +344,7 @@ impl<'a, I: BackwardsIterator>>>> Bac // of each profile are themselves identical. assert_eq!( descriptions, - interval.map_event(WithParent::::from), + interval.map_event(WithParent::>::from), "`summarize aggregate` requires identical sequences of events" ); diff --git a/summarize/src/analysis.rs b/summarize/src/analysis.rs index 48ef2e1..8d64753 100644 --- a/summarize/src/analysis.rs +++ b/summarize/src/analysis.rs @@ -118,7 +118,7 @@ pub fn perform_analysis(data: ProfilingData) -> Results { let mut query_data = FxHashMap::::default(); let mut artifact_sizes = BTreeMap::, ArtifactSize>::default(); - let mut threads = FxHashMap::<_, PerThreadState>::default(); + let mut threads = FxHashMap::<_, PerThreadState<'_>>::default(); let mut record_event_data = |label: &Cow<'_, str>, f: &dyn Fn(&mut QueryData)| { if let Some(data) = query_data.get_mut(&label[..]) { diff --git a/summarize/src/signed_duration.rs b/summarize/src/signed_duration.rs index 46a2c81..3ff1322 100644 --- a/summarize/src/signed_duration.rs +++ b/summarize/src/signed_duration.rs @@ -57,7 +57,7 @@ impl Sub for SignedDuration { } impl fmt::Debug for SignedDuration { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if self.is_positive { write!(f, "+")?; } else {