mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
chore: nightly clippy fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user