Skip to content
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

Merged
merged 2 commits into from
Feb 22, 2025
Merged

clippy suggestions #480

merged 2 commits into from
Feb 22, 2025

Conversation

Emilgardis
Copy link
Member

  • clippy fix and fix typo in channel.moderate
  • bunch of clippy suggestions

@Emilgardis Emilgardis enabled auto-merge February 22, 2025 17:05
@Emilgardis Emilgardis added this pull request to the merge queue Feb 22, 2025
Copy link
Contributor

@Nerixyz Nerixyz left a 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.

Comment on lines +282 to +285
if matches!(
e.downcast_ref(),
Some(tokio_tungstenite::tungstenite::error::Error::ConnectionClosed)
) {
Copy link
Contributor

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.

Copy link
Member Author

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.
Copy link
Contributor

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.

Merged via the queue into main with commit 738679e Feb 22, 2025
19 checks passed
@Emilgardis Emilgardis deleted the clippy-suggestions branch February 22, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants