Skip to content

Commit fa967f1

Browse files
committed
fix: clippy warning - use map instead of filter_map
1 parent 10b44f3 commit fa967f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,15 +988,15 @@ impl App {
988988

989989
let chats_map: std::collections::HashMap<i64, tl::enums::Chat> = chats
990990
.into_iter()
991-
.filter_map(|c| {
991+
.map(|c| {
992992
let id = match &c {
993993
tl::enums::Chat::Empty(ch) => ch.id,
994994
tl::enums::Chat::Chat(ch) => ch.id,
995995
tl::enums::Chat::Forbidden(ch) => ch.id,
996996
tl::enums::Chat::Channel(ch) => ch.id,
997997
tl::enums::Chat::ChannelForbidden(ch) => ch.id,
998998
};
999-
Some((id, c))
999+
(id, c)
10001000
})
10011001
.collect();
10021002

0 commit comments

Comments
 (0)