Skip to content

Commit 2308802

Browse files
committed
fix(lint): satisfy clippy
1 parent 03e1b6b commit 2308802

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/core/models.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ pub enum NotePosition {
77
}
88

99
impl NotePosition {
10-
pub fn as_str(&self) -> &'static str {
10+
pub fn as_str(self) -> &'static str {
1111
match self {
1212
Self::Right => "right of",
1313
Self::Left => "left of",
1414
Self::Over => "over",
1515
}
1616
}
1717

18-
pub fn next(&self) -> Self {
18+
pub fn next(self) -> Self {
1919
match self {
2020
Self::Right => Self::Left,
2121
Self::Left => Self::Over,
2222
Self::Over => Self::Right,
2323
}
2424
}
2525

26-
pub fn prev(&self) -> Self {
26+
pub fn prev(self) -> Self {
2727
match self {
2828
Self::Right => Self::Over,
2929
Self::Left => Self::Right,

src/core/sequence.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ impl SequenceDiagram {
190190
lines.join("\n") + "\n"
191191
}
192192

193+
#[allow(clippy::too_many_lines)]
193194
pub fn from_mermaid(input: &str) -> Result<Self> {
194195
let mut diagram = SequenceDiagram::new();
195196
let mut lines = input.lines();

src/ui/input.rs

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

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

0 commit comments

Comments
 (0)