refactor: remove unused allow(clippy::indexing_slicing) from 'truncate'

This commit is contained in:
link2xt
2024-11-18 20:10:20 +00:00
committed by l
parent 5ebca15502
commit a5d336fafc

View File

@@ -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() {