Skip to content

Commit 176b0de

Browse files
committed
refactor(clippy): define some lint exceptions globally
1 parent 32b49da commit 176b0de

5 files changed

Lines changed: 7 additions & 20 deletions

File tree

src/app.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::too_many_lines)]
2-
31
use crate::{
42
core::{Event, NotePosition, SequenceDiagram},
53
render::render_sequence,
@@ -567,11 +565,6 @@ fn confirm_keybindings(world: &mut World) {
567565
});
568566
}
569567

570-
#[allow(
571-
clippy::cast_possible_wrap,
572-
clippy::cast_possible_truncation,
573-
clippy::cast_sign_loss
574-
)]
575568
fn handle_input_confirm(world: &mut World) {
576569
let mode = world.get::<EditorState>().mode.clone();
577570
match mode {
@@ -794,11 +787,6 @@ fn save_note_changes(world: &mut World) {
794787
world.get_mut::<EditorState>().reset();
795788
}
796789

797-
#[allow(
798-
clippy::cast_possible_wrap,
799-
clippy::cast_possible_truncation,
800-
clippy::cast_sign_loss
801-
)]
802790
fn handle_participant_nav(world: &mut World, delta: i32) {
803791
let participant_count = world.get::<SequenceDiagram>().participant_count();
804792
if participant_count == 0 {
@@ -879,7 +867,6 @@ pub fn render(frame: &mut Frame, world: &mut World) {
879867
}
880868
}
881869

882-
#[allow(clippy::cast_possible_truncation)]
883870
fn render_empty_state(frame: &mut Frame, area: Rect, world: &World) {
884871
let theme = world.get::<Theme>();
885872
let block = Block::default()
@@ -941,7 +928,6 @@ fn render_empty_state(frame: &mut Frame, area: Rect, world: &World) {
941928
);
942929
}
943930

944-
#[allow(clippy::cast_possible_truncation)]
945931
fn render_dual_participant_selector(frame: &mut Frame, area: Rect, world: &World) {
946932
let editor = world.get::<EditorState>();
947933
let diagram = world.get::<SequenceDiagram>();
@@ -1027,7 +1013,6 @@ fn render_dual_participant_selector(frame: &mut Frame, area: Rect, world: &World
10271013
}
10281014
}
10291015

1030-
#[allow(clippy::cast_possible_truncation)]
10311016
fn render_note_participant_selector(frame: &mut Frame, area: Rect, world: &World) {
10321017
let editor = world.get::<EditorState>();
10331018
let diagram = world.get::<SequenceDiagram>();
@@ -1086,7 +1071,6 @@ fn render_note_participant_selector(frame: &mut Frame, area: Rect, world: &World
10861071
}
10871072
}
10881073

1089-
#[allow(clippy::cast_possible_truncation)]
10901074
fn render_note_position_selector(frame: &mut Frame, area: Rect, world: &World) {
10911075
let editor = world.get::<EditorState>();
10921076
let diagram = world.get::<SequenceDiagram>();

src/core/sequence.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ impl SequenceDiagram {
221221
lines.join("\n") + "\n"
222222
}
223223

224-
#[allow(clippy::too_many_lines)]
225224
pub fn from_mermaid(input: &str) -> Result<Self> {
226225
let mut diagram = SequenceDiagram::new();
227226
let mut lines = input.lines();

src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#![allow(
2+
clippy::cast_possible_wrap,
3+
clippy::cast_possible_truncation,
4+
clippy::cast_sign_loss,
5+
clippy::too_many_lines
6+
)]
7+
18
mod app;
29
mod core;
310
mod render;

src/render/sequence.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::cast_possible_truncation, clippy::too_many_lines)]
2-
31
use ratatui::{
42
Frame,
53
layout::{Alignment, Margin, Rect},

src/ui/input.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use crate::{
1212
theme::Theme,
1313
};
1414

15-
#[allow(clippy::too_many_lines)]
1615
pub fn render_input_popup(frame: &mut Frame, world: &World) {
1716
let editor = world.get::<EditorState>();
1817
let diagram = world.get::<SequenceDiagram>();

0 commit comments

Comments
 (0)