style: fix formatting after clippy changes
Some checks failed
ci/woodpecker/pr/check Pipeline failed
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled

This commit is contained in:
Mikhail Kilin
2026-02-22 17:33:48 +03:00
parent d4e1ed1376
commit 166fda93a4

View File

@@ -126,7 +126,11 @@ pub fn format_text_with_entities(
let start = entity.offset as usize;
let end = (entity.offset + entity.length) as usize;
for item in char_styles.iter_mut().take(end.min(chars.len())).skip(start) {
for item in char_styles
.iter_mut()
.take(end.min(chars.len()))
.skip(start)
{
match &entity.r#type {
TextEntityType::Bold => item.bold = true,
TextEntityType::Italic => item.italic = true,
@@ -140,9 +144,7 @@ pub fn format_text_with_entities(
| TextEntityType::TextUrl(_)
| TextEntityType::EmailAddress
| TextEntityType::PhoneNumber => item.url = true,
TextEntityType::Mention | TextEntityType::MentionName(_) => {
item.mention = true
}
TextEntityType::Mention | TextEntityType::MentionName(_) => item.mention = true,
_ => {}
}
}