diff --git a/src/rtfmt.rs b/src/rtfmt.rs index 2437423..26648f3 100644 --- a/src/rtfmt.rs +++ b/src/rtfmt.rs @@ -89,7 +89,7 @@ pub fn format(fmt: &str, arg: &str, clipped_str: &str) -> String { } } -fn remove_last_n_chars(s: &mut String, n: usize) -> () { +fn remove_last_n_chars(s: &mut String, n: usize) { match s.char_indices().nth_back(n) { Some((pos, ch)) => s.truncate(pos + ch.len_utf8()), None => s.clear(), diff --git a/src/tree.rs b/src/tree.rs index eb5e64f..eb32493 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -536,7 +536,7 @@ impl DisplayFormat for DisplayNode<'_> { maybe_html_escape( html_escape, - rtfmt::format(fmt_str, &value, &clipped_str), + rtfmt::format(fmt_str, &value, clipped_str), ) }) .into()