clippy fixes

This commit is contained in:
xxanqw committed 2025-07-06 13:23:13 +03:00
1 parent f0264ed35e
commit 62882d9782
1 file changed
+2 -8
+2 -8
View File
@@ -54,11 +54,7 @@ fn draw_miku_says(text: &str) -> Result<(), Box<dyn std::error::Error>> {
let bubble_center = bubble_width / 2; let bubble_center = bubble_width / 2;
let miku_tail_absolute_pos = overall_left_padding + tail_pos; let miku_tail_absolute_pos = overall_left_padding + tail_pos;
let bubble_left_padding = if miku_tail_absolute_pos >= bubble_center { let bubble_left_padding = miku_tail_absolute_pos.saturating_sub(bubble_center);
miku_tail_absolute_pos - bubble_center
} else {
0
};
let bubble_line_count = speech_bubble_lines.len(); let bubble_line_count = speech_bubble_lines.len();
@@ -112,9 +108,7 @@ fn get_speech_bubble_lines(text: &str) -> Vec<String> {
.max() .max()
.unwrap_or(0); .unwrap_or(0);
let bubble_width = (content_width + 4) let bubble_width = (content_width + 4).clamp(MIN_BUBBLE_WIDTH, MAX_BUBBLE_WIDTH);
.max(MIN_BUBBLE_WIDTH)
.min(MAX_BUBBLE_WIDTH);
let lines = wrap_text(text, bubble_width - 4); let lines = wrap_text(text, bubble_width - 4);
let mut bubble_lines = Vec::new(); let mut bubble_lines = Vec::new();