Skip to content

Commit

Permalink
refactor: apply clippy::needless-lifetimes suggestions (#603)
Browse files Browse the repository at this point in the history
See: https://github.com/tokio-rs/console/actions/runs/12277528296/job/34257115867?pr=602

I used `cargo clippy --workspace --all-targets --no-deps --fx` to fix it.

Signed-off-by: Rustin170506 <tech@rustin.me>
  • Loading branch information
Rustin170506 authored Dec 11, 2024
1 parent e4e535b commit 9f754be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tokio-console/src/view/durations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) struct Durations<'a> {
percentiles_width: u16,
}

impl<'a> Widget for Durations<'a> {
impl Widget for Durations<'_> {
fn render(self, area: ratatui::layout::Rect, buf: &mut ratatui::buffer::Buffer) {
// Only split the durations area in half if we're also drawing a
// sparkline. We require UTF-8 to draw the sparkline and also enough width.
Expand Down
4 changes: 2 additions & 2 deletions tokio-console/src/view/mini_histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub(crate) struct HistogramMetadata {
pub(crate) highest_outlier: Option<Duration>,
}

impl<'a> Default for MiniHistogram<'a> {
impl Default for MiniHistogram<'_> {
fn default() -> Self {
MiniHistogram {
block: None,
Expand All @@ -57,7 +57,7 @@ impl<'a> Default for MiniHistogram<'a> {
}
}

impl<'a> Widget for MiniHistogram<'a> {
impl Widget for MiniHistogram<'_> {
fn render(mut self, area: ratatui::layout::Rect, buf: &mut ratatui::buffer::Buffer) {
let inner_area = match self.block.take() {
Some(b) => {
Expand Down
2 changes: 1 addition & 1 deletion tokio-console/src/view/percentiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub(crate) struct Percentiles<'a> {
title: &'a str,
}

impl<'a> Widget for Percentiles<'a> {
impl Widget for Percentiles<'_> {
fn render(self, area: ratatui::layout::Rect, buf: &mut ratatui::buffer::Buffer) {
let inner = Paragraph::new(self.make_percentiles_inner())
.block(self.styles.border_block().title(self.title));
Expand Down

0 comments on commit 9f754be

Please sign in to comment.