diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-06-28 14:52:20 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-06-28 14:52:20 +0300 |
commit | cb842064572262d3e477416abf4fe09bb50d4a7c (patch) | |
tree | 0b58190a6168d84e71537dc7ec790781f4ef82f2 /text | |
parent | 5c00db62b785d5455848b2780acd319be64e120b (diff) |
Fix a couple of new 1.62 clippy warnings
Diffstat (limited to 'text')
-rw-r--r-- | text/ahead/src/textahead/imp.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/text/ahead/src/textahead/imp.rs b/text/ahead/src/textahead/imp.rs index 7c6a64f1..1ecf4d3f 100644 --- a/text/ahead/src/textahead/imp.rs +++ b/text/ahead/src/textahead/imp.rs @@ -344,10 +344,14 @@ impl TextAhead { if settings.ahead_attributes.is_empty() { text.push_str(&input.text); } else { - text.push_str(&format!( + use std::fmt::Write; + + write!( + &mut text, "<span {}>{}</span>", - settings.ahead_attributes, input.text - )); + settings.ahead_attributes, input.text, + ) + .unwrap(); } } |