Skip to content

Commit 9f754be

Browse files
authored
refactor: apply clippy::needless-lifetimes suggestions (#603)
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 <[email protected]>
1 parent e4e535b commit 9f754be

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tokio-console/src/view/durations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub(crate) struct Durations<'a> {
4040
percentiles_width: u16,
4141
}
4242

43-
impl<'a> Widget for Durations<'a> {
43+
impl Widget for Durations<'_> {
4444
fn render(self, area: ratatui::layout::Rect, buf: &mut ratatui::buffer::Buffer) {
4545
// Only split the durations area in half if we're also drawing a
4646
// sparkline. We require UTF-8 to draw the sparkline and also enough width.

tokio-console/src/view/mini_histogram.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub(crate) struct HistogramMetadata {
4444
pub(crate) highest_outlier: Option<Duration>,
4545
}
4646

47-
impl<'a> Default for MiniHistogram<'a> {
47+
impl Default for MiniHistogram<'_> {
4848
fn default() -> Self {
4949
MiniHistogram {
5050
block: None,
@@ -57,7 +57,7 @@ impl<'a> Default for MiniHistogram<'a> {
5757
}
5858
}
5959

60-
impl<'a> Widget for MiniHistogram<'a> {
60+
impl Widget for MiniHistogram<'_> {
6161
fn render(mut self, area: ratatui::layout::Rect, buf: &mut ratatui::buffer::Buffer) {
6262
let inner_area = match self.block.take() {
6363
Some(b) => {

tokio-console/src/view/percentiles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub(crate) struct Percentiles<'a> {
2121
title: &'a str,
2222
}
2323

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

0 commit comments

Comments
 (0)