Commit 26802bab55
26802bab55f6f955b21a950ecc119c7d39ab949e
parent: fd3fef5c9e
Unregistered key
VAWVAW <94846592+VAWVAW@users.noreply.github.com> · 2025-05-29 02:59 UTC
committer: <noreply@github.com>
Fix Clippy warnings for 1.83 (#429)
Layout: unified · split
src/base.rs
+4 −4
| @@ -293,7 +293,7 @@ impl<'de> Deserialize<'de> for SortColumn<SortFieldRoom> { |
| 293 | 293 | /// [serde] visitor for deserializing [SortColumn] for rooms and spaces. |
| 294 | 294 | struct SortRoomVisitor; |
| 295 | 295 | |
| 296 | | impl<'de> Visitor<'de> for SortRoomVisitor { |
| 296 | impl Visitor<'_> for SortRoomVisitor { |
| 297 | 297 | type Value = SortColumn<SortFieldRoom>; |
| 298 | 298 | |
| 299 | 299 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -346,7 +346,7 @@ impl<'de> Deserialize<'de> for SortColumn<SortFieldUser> { |
| 346 | 346 | /// [serde] visitor for deserializing [SortColumn] for users. |
| 347 | 347 | struct SortUserVisitor; |
| 348 | 348 | |
| 349 | | impl<'de> Visitor<'de> for SortUserVisitor { |
| 349 | impl Visitor<'_> for SortUserVisitor { |
| 350 | 350 | type Value = SortColumn<SortFieldUser>; |
| 351 | 351 | |
| 352 | 352 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -1182,7 +1182,7 @@ impl RoomInfo { |
| 1182 | 1182 | |
| 1183 | 1183 | /// Indicates whether we've recently fetched scrollback for this room. |
| 1184 | 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 | 1188 | fn clear_receipt(&mut self, user_id: &OwnedUserId) -> Option<()> { |
| @@ -1609,7 +1609,7 @@ impl<'de> Deserialize<'de> for IambId { |
| 1609 | 1609 | /// [serde] visitor for deserializing [IambId]. |
| 1610 | 1610 | struct IambIdVisitor; |
| 1611 | 1611 | |
| 1612 | | impl<'de> Visitor<'de> for IambIdVisitor { |
| 1612 | impl Visitor<'_> for IambIdVisitor { |
| 1613 | 1613 | type Value = IambId; |
| 1614 | 1614 | |
| 1615 | 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 | 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 | 102 | return false; |
| 103 | 103 | } |
| 104 | 104 | |
| @@ -152,7 +152,7 @@ pub enum ConfigError { |
| 152 | 152 | pub struct Keys(pub Vec<TerminalKey>, pub String); |
| 153 | 153 | pub struct KeysVisitor; |
| 154 | 154 | |
| 155 | | impl<'de> Visitor<'de> for KeysVisitor { |
| 155 | impl Visitor<'_> for KeysVisitor { |
| 156 | 156 | type Value = Keys; |
| 157 | 157 | |
| 158 | 158 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -183,7 +183,7 @@ impl<'de> Deserialize<'de> for Keys { |
| 183 | 183 | pub struct VimModes(pub Vec<VimMode>); |
| 184 | 184 | pub struct VimModesVisitor; |
| 185 | 185 | |
| 186 | | impl<'de> Visitor<'de> for VimModesVisitor { |
| 186 | impl Visitor<'_> for VimModesVisitor { |
| 187 | 187 | type Value = VimModes; |
| 188 | 188 | |
| 189 | 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 | 237 | type Value = LogLevel; |
| 238 | 238 | |
| 239 | 239 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { |
| @@ -268,7 +268,7 @@ impl<'de> Deserialize<'de> for LogLevel { |
| 268 | 268 | pub struct UserColor(pub Color); |
| 269 | 269 | pub struct UserColorVisitor; |
| 270 | 270 | |
| 271 | | impl<'de> Visitor<'de> for UserColorVisitor { |
| 271 | impl Visitor<'_> for UserColorVisitor { |
| 272 | 272 | type Value = UserColor; |
| 273 | 273 | |
| 274 | 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 | 423 | type Value = NotifyVia; |
| 424 | 424 | |
| 425 | 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 | 910 | type State = ChatState; |
| 911 | 911 | |
| 912 | 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 | 1288 | type State = ScrollbackState; |
| 1289 | 1289 | |
| 1290 | 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 | 188 | type State = SpaceState; |
| 189 | 189 | |
| 190 | 190 | fn render(self, area: Rect, buffer: &mut Buffer, state: &mut Self::State) { |