Commit 26802bab55
Unregistered key
Layout: unified · split
src/base.rs +4 −4
| @@ -293,7 +293,7 @@ impl<'de> Deserialize<'de> for SortColumn<SortFieldRoom> { | |||
| 293 | /// [serde] visitor for deserializing [SortColumn] for rooms and spaces. | 293 | /// [serde] visitor for deserializing [SortColumn] for rooms and spaces. |
| 294 | struct SortRoomVisitor; | 294 | struct SortRoomVisitor; |
| 295 | 295 | ||
| 296 | impl<'de> Visitor<'de> for SortRoomVisitor { | 296 | impl Visitor<'_> for SortRoomVisitor { |
| 297 | type Value = SortColumn<SortFieldRoom>; | 297 | type Value = SortColumn<SortFieldRoom>; |
| 298 | 298 | ||
| 299 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 299 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -346,7 +346,7 @@ impl<'de> Deserialize<'de> for SortColumn<SortFieldUser> { | |||
| 346 | /// [serde] visitor for deserializing [SortColumn] for users. | 346 | /// [serde] visitor for deserializing [SortColumn] for users. |
| 347 | struct SortUserVisitor; | 347 | struct SortUserVisitor; |
| 348 | 348 | ||
| 349 | impl<'de> Visitor<'de> for SortUserVisitor { | 349 | impl Visitor<'_> for SortUserVisitor { |
| 350 | type Value = SortColumn<SortFieldUser>; | 350 | type Value = SortColumn<SortFieldUser>; |
| 351 | 351 | ||
| 352 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 352 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -1182,7 +1182,7 @@ impl RoomInfo { | |||
| 1182 | 1182 | ||
| 1183 | /// Indicates whether we've recently fetched scrollback for this room. | 1183 | /// Indicates whether we've recently fetched scrollback for this room. |
| 1184 | pub fn recently_fetched(&self) -> bool { | 1184 | pub fn recently_fetched(&self) -> bool { |
| 1185 | self.fetch_last.map_or(false, |i| i.elapsed() < ROOM_FETCH_DEBOUNCE) | 1185 | self.fetch_last.is_some_and(|i| i.elapsed() < ROOM_FETCH_DEBOUNCE) |
| 1186 | } | 1186 | } |
| 1187 | 1187 | ||
| 1188 | fn clear_receipt(&mut self, user_id: &OwnedUserId) -> Option<()> { | 1188 | fn clear_receipt(&mut self, user_id: &OwnedUserId) -> Option<()> { |
| @@ -1609,7 +1609,7 @@ impl<'de> Deserialize<'de> for IambId { | |||
| 1609 | /// [serde] visitor for deserializing [IambId]. | 1609 | /// [serde] visitor for deserializing [IambId]. |
| 1610 | struct IambIdVisitor; | 1610 | struct IambIdVisitor; |
| 1611 | 1611 | ||
| 1612 | impl<'de> Visitor<'de> for IambIdVisitor { | 1612 | impl Visitor<'_> for IambIdVisitor { |
| 1613 | type Value = IambId; | 1613 | type Value = IambId; |
| 1614 | 1614 | ||
| 1615 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 1615 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
src/config.rs +6 −6
| @@ -98,7 +98,7 @@ fn validate_profile_name(name: &str) -> bool { | |||
| 98 | 98 | ||
| 99 | let mut chars = name.chars(); | 99 | let mut chars = name.chars(); |
| 100 | 100 | ||
| 101 | if !chars.next().map_or(false, |c| c.is_ascii_alphanumeric()) { | 101 | if !chars.next().is_some_and(|c| c.is_ascii_alphanumeric()) { |
| 102 | return false; | 102 | return false; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -152,7 +152,7 @@ pub enum ConfigError { | |||
| 152 | pub struct Keys(pub Vec<TerminalKey>, pub String); | 152 | pub struct Keys(pub Vec<TerminalKey>, pub String); |
| 153 | pub struct KeysVisitor; | 153 | pub struct KeysVisitor; |
| 154 | 154 | ||
| 155 | impl<'de> Visitor<'de> for KeysVisitor { | 155 | impl Visitor<'_> for KeysVisitor { |
| 156 | type Value = Keys; | 156 | type Value = Keys; |
| 157 | 157 | ||
| 158 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 158 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -183,7 +183,7 @@ impl<'de> Deserialize<'de> for Keys { | |||
| 183 | pub struct VimModes(pub Vec<VimMode>); | 183 | pub struct VimModes(pub Vec<VimMode>); |
| 184 | pub struct VimModesVisitor; | 184 | pub struct VimModesVisitor; |
| 185 | 185 | ||
| 186 | impl<'de> Visitor<'de> for VimModesVisitor { | 186 | impl Visitor<'_> for VimModesVisitor { |
| 187 | type Value = VimModes; | 187 | type Value = VimModes; |
| 188 | 188 | ||
| 189 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 189 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -233,7 +233,7 @@ impl From<LogLevel> for Level { | |||
| 233 | } | 233 | } |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | impl<'de> Visitor<'de> for LogLevelVisitor { | 236 | impl Visitor<'_> for LogLevelVisitor { |
| 237 | type Value = LogLevel; | 237 | type Value = LogLevel; |
| 238 | 238 | ||
| 239 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 239 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -268,7 +268,7 @@ impl<'de> Deserialize<'de> for LogLevel { | |||
| 268 | pub struct UserColor(pub Color); | 268 | pub struct UserColor(pub Color); |
| 269 | pub struct UserColorVisitor; | 269 | pub struct UserColorVisitor; |
| 270 | 270 | ||
| 271 | impl<'de> Visitor<'de> for UserColorVisitor { | 271 | impl Visitor<'_> for UserColorVisitor { |
| 272 | type Value = UserColor; | 272 | type Value = UserColor; |
| 273 | 273 | ||
| 274 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 274 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -419,7 +419,7 @@ impl Default for NotifyVia { | |||
| 419 | } | 419 | } |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | impl<'de> Visitor<'de> for NotifyViaVisitor { | 422 | impl Visitor<'_> for NotifyViaVisitor { |
| 423 | type Value = NotifyVia; | 423 | type Value = NotifyVia; |
| 424 | 424 | ||
| 425 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { | 425 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
src/windows/room/chat.rs +1 −1
| @@ -906,7 +906,7 @@ impl<'a> Chat<'a> { | |||
| 906 | } | 906 | } |
| 907 | } | 907 | } |
| 908 | 908 | ||
| 909 | impl<'a> StatefulWidget for Chat<'a> { | 909 | impl StatefulWidget for Chat<'_> { |
| 910 | type State = ChatState; | 910 | type State = ChatState; |
| 911 | 911 | ||
| 912 | fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) { | 912 | fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) { |
src/windows/room/scrollback.rs +1 −1
| @@ -1284,7 +1284,7 @@ impl<'a> Scrollback<'a> { | |||
| 1284 | } | 1284 | } |
| 1285 | } | 1285 | } |
| 1286 | 1286 | ||
| 1287 | impl<'a> StatefulWidget for Scrollback<'a> { | 1287 | impl StatefulWidget for Scrollback<'_> { |
| 1288 | type State = ScrollbackState; | 1288 | type State = ScrollbackState; |
| 1289 | 1289 | ||
| 1290 | fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) { | 1290 | fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) { |
src/windows/room/space.rs +1 −1
| @@ -184,7 +184,7 @@ impl<'a> Space<'a> { | |||
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | impl<'a> StatefulWidget for Space<'a> { | 187 | impl StatefulWidget for Space<'_> { |
| 188 | type State = SpaceState; | 188 | type State = SpaceState; |
| 189 | 189 | ||
| 190 | fn render(self, area: Rect, buffer: &mut Buffer, state: &mut Self::State) { | 190 | fn render(self, area: Rect, buffer: &mut Buffer, state: &mut Self::State) { |