summaryrefslogtreecommitdiffstats
path: root/src/render/stream.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-29 09:26:39 +0800
committerGitHub <noreply@github.com>2024-11-29 09:26:39 +0800
commita51cfde28bd1664b55ea31686ac1def018fc0bd7 (patch)
treea1a0b7c406ad1d4ffbb3465afb4c93cd4d412166 /src/render/stream.rs
parent59df81b41cc91d93da465e32a9500ee614b18c11 (diff)
downloadaichat-a51cfde28bd1664b55ea31686ac1def018fc0bd7.tar.gz
chore: clippy for the new rust version (#1018)
Diffstat (limited to 'src/render/stream.rs')
-rw-r--r--src/render/stream.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/stream.rs b/src/render/stream.rs
index 6ff6ea7..d2ac6ef 100644
--- a/src/render/stream.rs
+++ b/src/render/stream.rs
@@ -204,5 +204,5 @@ fn split_line_tail(text: &str) -> (&str, &str) {
fn need_rows(text: &str, columns: u16) -> u16 {
let buffer_width = display_width(text).max(1) as u16;
- (buffer_width + columns - 1) / columns
+ buffer_width.div_ceil(columns)
}