-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clippy suggestions #480
clippy suggestions #480
Conversation
Emilgardis
commented
Feb 22, 2025
- clippy fix and fix typo in channel.moderate
- bunch of clippy suggestions
d1db038
to
ab7221a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool how Clippy tells you that functions can be const. Some day, clang-tidy will do this for C++ too.
if matches!( | ||
e.downcast_ref(), | ||
Some(tokio_tungstenite::tungstenite::error::Error::ConnectionClosed) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be if !matches!(...)
? Looks a bit silly with the two exclamation marks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, definitely can be improved
@@ -83,11 +83,11 @@ pub struct ChannelModerateV1Payload { | |||
/// Is [Some] when in a shared chat session, and the action happens in the channel of a participant other than the broadcaster. | |||
pub source_broadcaster_user_name: Option<types::DisplayName>, | |||
|
|||
/// The broadcaster user ID. | |||
/// The user ID of moderator who performed the action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, was probably a copy-paste mistake.