We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ebca15 commit a5d336fCopy full SHA for a5d336f
src/tools.rs
@@ -45,7 +45,6 @@ use crate::stock_str;
45
46
/// Shortens a string to a specified length and adds "[...]" to the
47
/// end of the shortened string.
48
-#[allow(clippy::indexing_slicing)]
49
pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<str> {
50
let count = buf.chars().count();
51
if count > approx_chars + DC_ELLIPSIS.len() {
0 commit comments