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> {
293293/// [serde] visitor for deserializing [SortColumn] for rooms and spaces.
294294struct SortRoomVisitor;
295295
296impl<'de> Visitor<'de> for SortRoomVisitor {
296impl Visitor<'_> for SortRoomVisitor {
297297 type Value = SortColumn<SortFieldRoom>;
298298
299299 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -346,7 +346,7 @@ impl<'de> Deserialize<'de> for SortColumn<SortFieldUser> {
346346/// [serde] visitor for deserializing [SortColumn] for users.
347347struct SortUserVisitor;
348348
349impl<'de> Visitor<'de> for SortUserVisitor {
349impl Visitor<'_> for SortUserVisitor {
350350 type Value = SortColumn<SortFieldUser>;
351351
352352 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -1182,7 +1182,7 @@ impl RoomInfo {
11821182
11831183 /// Indicates whether we've recently fetched scrollback for this room.
11841184 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)
11861186 }
11871187
11881188 fn clear_receipt(&mut self, user_id: &OwnedUserId) -> Option<()> {
@@ -1609,7 +1609,7 @@ impl<'de> Deserialize<'de> for IambId {
16091609/// [serde] visitor for deserializing [IambId].
16101610struct IambIdVisitor;
16111611
1612impl<'de> Visitor<'de> for IambIdVisitor {
1612impl Visitor<'_> for IambIdVisitor {
16131613 type Value = IambId;
16141614
16151615 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 {
9898
9999 let mut chars = name.chars();
100100
101 if !chars.next().map_or(false, |c| c.is_ascii_alphanumeric()) {
101 if !chars.next().is_some_and(|c| c.is_ascii_alphanumeric()) {
102102 return false;
103103 }
104104
@@ -152,7 +152,7 @@ pub enum ConfigError {
152152pub struct Keys(pub Vec<TerminalKey>, pub String);
153153pub struct KeysVisitor;
154154
155impl<'de> Visitor<'de> for KeysVisitor {
155impl Visitor<'_> for KeysVisitor {
156156 type Value = Keys;
157157
158158 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -183,7 +183,7 @@ impl<'de> Deserialize<'de> for Keys {
183183pub struct VimModes(pub Vec<VimMode>);
184184pub struct VimModesVisitor;
185185
186impl<'de> Visitor<'de> for VimModesVisitor {
186impl Visitor<'_> for VimModesVisitor {
187187 type Value = VimModes;
188188
189189 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -233,7 +233,7 @@ impl From<LogLevel> for Level {
233233 }
234234}
235235
236impl<'de> Visitor<'de> for LogLevelVisitor {
236impl Visitor<'_> for LogLevelVisitor {
237237 type Value = LogLevel;
238238
239239 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -268,7 +268,7 @@ impl<'de> Deserialize<'de> for LogLevel {
268268pub struct UserColor(pub Color);
269269pub struct UserColorVisitor;
270270
271impl<'de> Visitor<'de> for UserColorVisitor {
271impl Visitor<'_> for UserColorVisitor {
272272 type Value = UserColor;
273273
274274 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -419,7 +419,7 @@ impl Default for NotifyVia {
419419 }
420420}
421421
422impl<'de> Visitor<'de> for NotifyViaVisitor {
422impl Visitor<'_> for NotifyViaVisitor {
423423 type Value = NotifyVia;
424424
425425 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
src/windows/room/chat.rs +1 −1
@@ -906,7 +906,7 @@ impl<'a> Chat<'a> {
906906 }
907907}
908908
909impl<'a> StatefulWidget for Chat<'a> {
909impl StatefulWidget for Chat<'_> {
910910 type State = ChatState;
911911
912912 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> {
12841284 }
12851285}
12861286
1287impl<'a> StatefulWidget for Scrollback<'a> {
1287impl StatefulWidget for Scrollback<'_> {
12881288 type State = ScrollbackState;
12891289
12901290 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> {
184184 }
185185}
186186
187impl<'a> StatefulWidget for Space<'a> {
187impl StatefulWidget for Space<'_> {
188188 type State = SpaceState;
189189
190190 fn render(self, area: Rect, buffer: &mut Buffer, state: &mut Self::State) {