Skip to content

Commit

Permalink
refactor: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Sep 7, 2024
1 parent dba33ae commit a35e3c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/slides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl Slides {
for item in &slide.content {
slide_items.push((
make_slide_content(item.clone(), json_slides.clone()),
get_slide_content_string(&item),
get_slide_content_string(item),
item.rect,
item.data.clone(),
));
Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Config {
for (style_key, style) in default_styles.iter() {
user_styles
.entry(style_key.clone())
.or_insert_with(|| style.clone());
.or_insert_with(|| *style);
}
}

Expand Down Expand Up @@ -214,7 +214,7 @@ pub fn key_event_to_string(key_event: &KeyEvent) -> String {
char = format!("f({c})");
&char
}
KeyCode::Char(c) if c == ' ' => "space",
KeyCode::Char(' ') => "space",
KeyCode::Char(c) => {
char = c.to_string();
&char
Expand Down Expand Up @@ -455,7 +455,7 @@ mod tests {
#[test]
fn test_parse_color_rgb() {
let color = parse_color("rgb123");
let expected = 16 + 1 * 36 + 2 * 6 + 3;
let expected = 16 + 36 + 2 * 6 + 3;
assert_eq!(color, Some(Color::Indexed(expected)));
}

Expand Down

0 comments on commit a35e3c5

Please sign in to comment.