Skip to content

Commit

Permalink
rust: elide lifetimes for clippy analysis
Browse files Browse the repository at this point in the history
A new version of Rust has made unnecessary lifetime annotations an
error for `cargo clippy`. This change removes them, replacing them with
a default `'_`.
  • Loading branch information
abrown committed Jan 7, 2025
1 parent d3356e4 commit 7e1c8ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/ittapi/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl StartedEvent<'_> {
}
}

impl<'a> Drop for StartedEvent<'a> {
impl Drop for StartedEvent<'_> {
fn drop(&mut self) {
if let Some(end_fn) = unsafe { ittapi_sys::__itt_event_end_ptr__3_0 } {
let result = unsafe { end_fn(self.event) };
Expand Down
2 changes: 1 addition & 1 deletion rust/ittapi/src/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Region {
/// A [`MarkedRegion`] is a Rust helper structure for ergonomically ending a marked region using
/// `__itt_mark_pt_region_end`. See [`Region::mark`] for more details.
pub struct MarkedRegion<'a>(&'a Region);
impl<'a> MarkedRegion<'a> {
impl MarkedRegion<'_> {
/// End the marked region.
#[inline]
pub fn end(self) {
Expand Down
2 changes: 1 addition & 1 deletion rust/ittapi/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<'a> Task<'a> {
}
}

impl<'a> Drop for Task<'a> {
impl Drop for Task<'_> {
fn drop(&mut self) {
// If `ittnotify` has not been initialized, this function may not be wired up.
if let Some(end_fn) = unsafe { ittapi_sys::__itt_task_end_ptr__3_0 } {
Expand Down

0 comments on commit 7e1c8ab

Please sign in to comment.