chore: nightly clippy fixes

This commit is contained in:
link2xt
2025-06-17 21:35:13 +00:00
committed by l
parent 0568393157
commit 139fbfae85
14 changed files with 28 additions and 28 deletions

View File

@@ -46,7 +46,7 @@ use crate::stock_str;
/// Shortens a string to a specified length and adds "[...]" to the
/// end of the shortened string.
pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<str> {
pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<'_, str> {
let count = buf.chars().count();
if count <= approx_chars + DC_ELLIPSIS.len() {
return Cow::Borrowed(buf);