Skip to content

Commit b5e5a66

Browse files
committed
notifications: tweak style
1 parent baa065c commit b5e5a66

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/notifications.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,10 @@ impl Notification<'_> {
140140
NoCanonicalPath(_) => NotificationLevel::Warn,
141141
Error(_) => NotificationLevel::Error,
142142
CreatingRoot(_) | CreatingFile(_) => NotificationLevel::Debug,
143-
FileDeletion(_, result) | DirectoryDeletion(_, result) => {
144-
if result.is_ok() {
145-
NotificationLevel::Debug
146-
} else {
147-
NotificationLevel::Warn
148-
}
149-
}
143+
FileDeletion(_, result) | DirectoryDeletion(_, result) => match result {
144+
Ok(_) => NotificationLevel::Debug,
145+
Err(_) => NotificationLevel::Warn,
146+
},
150147
ToolchainDirectory(_)
151148
| LookingForToolchain(_)
152149
| InstallingToolchain(_)

0 commit comments

Comments
 (0)