style: auto-format entire codebase with cargo fmt (stable rustfmt.toml)
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:09:51 +03:00
parent 2442a90e23
commit 264f183510
90 changed files with 1632 additions and 1450 deletions

View File

@@ -39,11 +39,7 @@ impl NotificationManager {
}
/// Creates a notification manager with custom settings
pub fn with_config(
enabled: bool,
only_mentions: bool,
show_preview: bool,
) -> Self {
pub fn with_config(enabled: bool, only_mentions: bool, show_preview: bool) -> Self {
Self {
enabled,
muted_chats: HashSet::new(),
@@ -311,22 +307,13 @@ mod tests {
#[test]
fn test_beautify_media_labels() {
// Test photo
assert_eq!(
NotificationManager::beautify_media_labels("[Фото]"),
"📷 Фото"
);
assert_eq!(NotificationManager::beautify_media_labels("[Фото]"), "📷 Фото");
// Test video
assert_eq!(
NotificationManager::beautify_media_labels("[Видео]"),
"🎥 Видео"
);
assert_eq!(NotificationManager::beautify_media_labels("[Видео]"), "🎥 Видео");
// Test sticker with emoji
assert_eq!(
NotificationManager::beautify_media_labels("[Стикер: 😊]"),
"🎨 Стикер: 😊]"
);
assert_eq!(NotificationManager::beautify_media_labels("[Стикер: 😊]"), "🎨 Стикер: 😊]");
// Test audio with title
assert_eq!(
@@ -341,10 +328,7 @@ mod tests {
);
// Test regular text (no changes)
assert_eq!(
NotificationManager::beautify_media_labels("Hello, world!"),
"Hello, world!"
);
assert_eq!(NotificationManager::beautify_media_labels("Hello, world!"), "Hello, world!");
// Test mixed content
assert_eq!(