Skip to content

Commit

Permalink
chore: fix clippy lints from Rust 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiapple852 committed Sep 7, 2024
1 parent 5aec2a9 commit 8612524
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/trippy-core/tests/sim/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct Tracer {
}

impl Tracer {
pub fn new(sim: Arc<Simulation>, token: CancellationToken) -> Self {
pub const fn new(sim: Arc<Simulation>, token: CancellationToken) -> Self {
Self { sim, token }
}

Expand Down
1 change: 1 addition & 0 deletions crates/trippy-tui/src/frontend/render/widgets/sparkline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ mod tests {

#[test]
fn it_does_not_panic_if_max_is_set_to_zero() {
#[allow(clippy::unnecessary_min_or_max)]
let widget = Sparkline::default().data(&[0, 1, 2]).max(0);
let buffer = render(widget, 6);
assert_eq!(buffer, Buffer::with_lines([" xxx"]));
Expand Down

0 comments on commit 8612524

Please sign in to comment.