mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
refactor: remove unused allow(clippy::indexing_slicing) from 'truncate'
This commit is contained in:
@@ -45,7 +45,6 @@ use crate::stock_str;
|
||||
|
||||
/// Shortens a string to a specified length and adds "[...]" to the
|
||||
/// end of the shortened string.
|
||||
#[allow(clippy::indexing_slicing)]
|
||||
pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<str> {
|
||||
let count = buf.chars().count();
|
||||
if count > approx_chars + DC_ELLIPSIS.len() {
|
||||
|
||||
Reference in New Issue
Block a user