Skip to content

Commit

Permalink
all: fix elided-lifetime-in-paths warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
msfjarvis committed Feb 14, 2022
1 parent 12593fb commit 9ad20d5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crox/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn generate_thread_to_collapsed_thread_mapping(
thread_to_collapsed_thread
}

fn get_args(full_event: &analyzeme::Event) -> Option<FxHashMap<String, String>> {
fn get_args(full_event: &analyzeme::Event<'_>) -> Option<FxHashMap<String, String>> {
if !full_event.additional_data.is_empty() {
Some(
full_event
Expand Down
2 changes: 1 addition & 1 deletion measureme/src/event_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
4 changes: 2 additions & 2 deletions summarize/src/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl<'a, I: BackwardsIterator<Item = SampleInterval<WithParent<Event<'a>>>>> 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::<EventDescription>::from);
let descriptions = interval.map_event(WithParent::<EventDescription<'_>>::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
Expand All @@ -344,7 +344,7 @@ impl<'a, I: BackwardsIterator<Item = SampleInterval<WithParent<Event<'a>>>>> Bac
// of each profile are themselves identical.
assert_eq!(
descriptions,
interval.map_event(WithParent::<EventDescription>::from),
interval.map_event(WithParent::<EventDescription<'_>>::from),
"`summarize aggregate` requires identical sequences of events"
);

Expand Down
2 changes: 1 addition & 1 deletion summarize/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn perform_analysis(data: ProfilingData) -> Results {

let mut query_data = FxHashMap::<String, QueryData>::default();
let mut artifact_sizes = BTreeMap::<Cow<'_, str>, 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[..]) {
Expand Down
2 changes: 1 addition & 1 deletion summarize/src/signed_duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9ad20d5

Please sign in to comment.