| @@ -97,12 +97,12 @@ fn bold_style() -> Style { |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | #[inline] |
| 100 | | fn bold_span(s: &str) -> Span { |
| 100 | fn bold_span(s: &str) -> Span<'_> { |
| 101 | 101 | Span::styled(s, bold_style()) |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | #[inline] |
| 105 | | fn bold_spans(s: &str) -> Line { |
| 105 | fn bold_spans(s: &str) -> Line<'_> { |
| 106 | 106 | bold_span(s).into() |
| 107 | 107 | } |
| 108 | 108 | |
| @@ -116,12 +116,12 @@ fn selected_style(selected: bool) -> Style { |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | #[inline] |
| 119 | | fn selected_span(s: &str, selected: bool) -> Span { |
| 119 | fn selected_span(s: &str, selected: bool) -> Span<'_> { |
| 120 | 120 | Span::styled(s, selected_style(selected)) |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | #[inline] |
| 124 | | fn selected_text(s: &str, selected: bool) -> Text { |
| 124 | fn selected_text(s: &str, selected: bool) -> Text<'_> { |
| 125 | 125 | Text::from(selected_span(s, selected)) |
| 126 | 126 | } |
| 127 | 127 | |
| @@ -743,7 +743,7 @@ impl Window<IambInfo> for IambWindow { |
| 743 | 743 | } |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | | fn get_tab_title(&self, store: &mut ProgramStore) -> Line { |
| 746 | fn get_tab_title(&self, store: &mut ProgramStore) -> Line<'_> { |
| 747 | 747 | match self { |
| 748 | 748 | IambWindow::DirectList(_) => bold_spans("Direct Messages"), |
| 749 | 749 | IambWindow::RoomList(_) => bold_spans("Rooms"), |
| @@ -771,7 +771,7 @@ impl Window<IambInfo> for IambWindow { |
| 771 | 771 | } |
| 772 | 772 | } |
| 773 | 773 | |
| 774 | | fn get_win_title(&self, store: &mut ProgramStore) -> Line { |
| 774 | fn get_win_title(&self, store: &mut ProgramStore) -> Line<'_> { |
| 775 | 775 | match self { |
| 776 | 776 | IambWindow::DirectList(_) => bold_spans("Direct Messages"), |
| 777 | 777 | IambWindow::RoomList(_) => bold_spans("Rooms"), |
| @@ -959,7 +959,12 @@ impl Display for GenericChatItem { |
| 959 | 959 | } |
| 960 | 960 | |
| 961 | 961 | impl ListItem<IambInfo> for GenericChatItem { |
| 962 | | fn show(&self, selected: bool, _: &ViewportContext<ListCursor>, _: &mut ProgramStore) -> Text { |
| 962 | fn show( |
| 963 | &self, |
| 964 | selected: bool, |
| 965 | _: &ViewportContext<ListCursor>, |
| 966 | _: &mut ProgramStore, |
| 967 | ) -> Text<'_> { |
| 963 | 968 | let unread = self.unread.is_unread(); |
| 964 | 969 | let style = selected_style(selected); |
| 965 | 970 | let (name, mut labels) = name_and_labels(&self.name, unread, style); |
| @@ -1073,7 +1078,12 @@ impl Display for RoomItem { |
| 1073 | 1078 | } |
| 1074 | 1079 | |
| 1075 | 1080 | impl ListItem<IambInfo> for RoomItem { |
| 1076 | | fn show(&self, selected: bool, _: &ViewportContext<ListCursor>, _: &mut ProgramStore) -> Text { |
| 1081 | fn show( |
| 1082 | &self, |
| 1083 | selected: bool, |
| 1084 | _: &ViewportContext<ListCursor>, |
| 1085 | _: &mut ProgramStore, |
| 1086 | ) -> Text<'_> { |
| 1077 | 1087 | let unread = self.unread.is_unread(); |
| 1078 | 1088 | let style = selected_style(selected); |
| 1079 | 1089 | let (name, mut labels) = name_and_labels(&self.name, unread, style); |
| @@ -1177,7 +1187,12 @@ impl Display for DirectItem { |
| 1177 | 1187 | } |
| 1178 | 1188 | |
| 1179 | 1189 | impl ListItem<IambInfo> for DirectItem { |
| 1180 | | fn show(&self, selected: bool, _: &ViewportContext<ListCursor>, _: &mut ProgramStore) -> Text { |
| 1190 | fn show( |
| 1191 | &self, |
| 1192 | selected: bool, |
| 1193 | _: &ViewportContext<ListCursor>, |
| 1194 | _: &mut ProgramStore, |
| 1195 | ) -> Text<'_> { |
| 1181 | 1196 | let unread = self.unread.is_unread(); |
| 1182 | 1197 | let style = selected_style(selected); |
| 1183 | 1198 | let (name, mut labels) = name_and_labels(&self.name, unread, style); |
| @@ -1280,7 +1295,12 @@ impl Display for SpaceItem { |
| 1280 | 1295 | } |
| 1281 | 1296 | |
| 1282 | 1297 | impl ListItem<IambInfo> for SpaceItem { |
| 1283 | | fn show(&self, selected: bool, _: &ViewportContext<ListCursor>, _: &mut ProgramStore) -> Text { |
| 1298 | fn show( |
| 1299 | &self, |
| 1300 | selected: bool, |
| 1301 | _: &ViewportContext<ListCursor>, |
| 1302 | _: &mut ProgramStore, |
| 1303 | ) -> Text<'_> { |
| 1284 | 1304 | selected_text(self.name.as_str(), selected) |
| 1285 | 1305 | } |
| 1286 | 1306 | |
| @@ -1411,7 +1431,12 @@ impl Display for VerifyItem { |
| 1411 | 1431 | } |
| 1412 | 1432 | |
| 1413 | 1433 | impl ListItem<IambInfo> for VerifyItem { |
| 1414 | | fn show(&self, selected: bool, _: &ViewportContext<ListCursor>, _: &mut ProgramStore) -> Text { |
| 1434 | fn show( |
| 1435 | &self, |
| 1436 | selected: bool, |
| 1437 | _: &ViewportContext<ListCursor>, |
| 1438 | _: &mut ProgramStore, |
| 1439 | ) -> Text<'_> { |
| 1415 | 1440 | let mut lines = vec![]; |
| 1416 | 1441 | |
| 1417 | 1442 | let bold = Style::default().add_modifier(StyleModifier::BOLD); |
| @@ -1521,7 +1546,7 @@ impl ListItem<IambInfo> for MemberItem { |
| 1521 | 1546 | selected: bool, |
| 1522 | 1547 | _: &ViewportContext<ListCursor>, |
| 1523 | 1548 | store: &mut ProgramStore, |
| 1524 | | ) -> Text { |
| 1549 | ) -> Text<'_> { |
| 1525 | 1550 | let info = store.application.rooms.get_or_default(self.room_id.clone()); |
| 1526 | 1551 | let user_id = self.member.user_id(); |
| 1527 | 1552 | |