Fix some clippy warnings

timeout_old
Tassilo Horn 2 years ago
parent 7a57f6e541
commit e108b360f1
  1. 2
      src/rtfmt.rs
  2. 2
      src/tree.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(),

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

Loading…
Cancel
Save