Skip to content

feat: Add bsky-sdk #259

feat: Add bsky-sdk

feat: Add bsky-sdk #259

GitHub Actions / clippy failed May 29, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (5)

bsky-sdk/src/moderation.rs|70 col 33| warning: unused variable: embed
--> bsky-sdk/src/moderation.rs:70:33
|
70 | if let Some(Union::Refs(embed)) = &subject.embed {
| ^^^^^ help: if this is intentional, prefix it with an underscore: _embed
|
= note: #[warn(unused_variables)] on by default
bsky-sdk/src/moderation/types.rs|366 col 17| warning: variants Blocking, BlockedBy, BlockOther, Muted, MuteWord, and Hidden are never constructed
--> bsky-sdk/src/moderation/types.rs:367:5
|
366 | pub(crate) enum ModerationCause {
| --------------- variants in this enum
367 | Blocking(
| ^^^^^^^^
...
370 | BlockedBy(
| ^^^^^^^^^
...
373 | BlockOther(
| ^^^^^^^^^^
...
377 | Muted(
| ^^^^^
...
380 | MuteWord(
| ^^^^^^^^
...
383 | Hidden(
| ^^^^^^
|
= note: ModerationCause has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
= note: #[warn(dead_code)] on by default
bsky-sdk/src/moderation/types.rs|404 col 17| warning: variant List is never constructed
--> bsky-sdk/src/moderation/types.rs:406:5
|
404 | pub(crate) enum ModerationCauseSource {
| --------------------- variant in this enum
405 | User,
406 | List(ListViewBasic),
| ^^^^
|
= note: ModerationCauseSource has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
bsky-sdk/src/moderation/types.rs|411 col 19| warning: fields source, label, and label_def are never read
--> bsky-sdk/src/moderation/types.rs:412:9
|
411 | pub(crate) struct ModerationCauseLabel {
| -------------------- fields in this struct
412 | pub source: ModerationCauseSource,
| ^^^^^^
413 | pub label: Label,
| ^^^^^
414 | pub label_def: InterpretedLabelValueDefinition,
| ^^^^^^^^^
|
= note: ModerationCauseLabel has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis
bsky-sdk/src/moderation/types.rs|404 col 1| warning: large size difference between variants
--> bsky-sdk/src/moderation/types.rs:404:1
|
404 | / pub(crate) enum ModerationCauseSource {
405 | | User,
406 | | List(ListViewBasic),
| | ------------------- the largest variant contains at least 288 bytes
407 | | Labeler(Did),
| | ------------ the second-largest variant contains at least 24 bytes
408 | | }
| |_^ the entire enum is at least 288 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: #[warn(clippy::large_enum_variant)] on by default
help: consider boxing the large fields to reduce the total size of the enum
|
406 | List(Box),
| ~~~~~~~~~~~~~~~~~~

Filtered Findings (0)

Annotations

Check warning on line 70 in bsky-sdk/src/moderation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] bsky-sdk/src/moderation.rs#L70

warning: unused variable: `embed`
  --> bsky-sdk/src/moderation.rs:70:33
   |
70 |         if let Some(Union::Refs(embed)) = &subject.embed {
   |                                 ^^^^^ help: if this is intentional, prefix it with an underscore: `_embed`
   |
   = note: `#[warn(unused_variables)]` on by default
Raw output
bsky-sdk/src/moderation.rs:70:33:w:warning: unused variable: `embed`
  --> bsky-sdk/src/moderation.rs:70:33
   |
70 |         if let Some(Union::Refs(embed)) = &subject.embed {
   |                                 ^^^^^ help: if this is intentional, prefix it with an underscore: `_embed`
   |
   = note: `#[warn(unused_variables)]` on by default


__END__

Check warning on line 366 in bsky-sdk/src/moderation/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] bsky-sdk/src/moderation/types.rs#L366

warning: variants `Blocking`, `BlockedBy`, `BlockOther`, `Muted`, `MuteWord`, and `Hidden` are never constructed
   --> bsky-sdk/src/moderation/types.rs:367:5
    |
366 | pub(crate) enum ModerationCause {
    |                 --------------- variants in this enum
367 |     Blocking(
    |     ^^^^^^^^
...
370 |     BlockedBy(
    |     ^^^^^^^^^
...
373 |     BlockOther(
    |     ^^^^^^^^^^
...
377 |     Muted(
    |     ^^^^^
...
380 |     MuteWord(
    |     ^^^^^^^^
...
383 |     Hidden(
    |     ^^^^^^
    |
    = note: `ModerationCause` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default
Raw output
bsky-sdk/src/moderation/types.rs:366:17:w:warning: variants `Blocking`, `BlockedBy`, `BlockOther`, `Muted`, `MuteWord`, and `Hidden` are never constructed
   --> bsky-sdk/src/moderation/types.rs:367:5
    |
366 | pub(crate) enum ModerationCause {
    |                 --------------- variants in this enum
367 |     Blocking(
    |     ^^^^^^^^
...
370 |     BlockedBy(
    |     ^^^^^^^^^
...
373 |     BlockOther(
    |     ^^^^^^^^^^
...
377 |     Muted(
    |     ^^^^^
...
380 |     MuteWord(
    |     ^^^^^^^^
...
383 |     Hidden(
    |     ^^^^^^
    |
    = note: `ModerationCause` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default


__END__

Check warning on line 404 in bsky-sdk/src/moderation/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] bsky-sdk/src/moderation/types.rs#L404

warning: variant `List` is never constructed
   --> bsky-sdk/src/moderation/types.rs:406:5
    |
404 | pub(crate) enum ModerationCauseSource {
    |                 --------------------- variant in this enum
405 |     User,
406 |     List(ListViewBasic),
    |     ^^^^
    |
    = note: `ModerationCauseSource` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
Raw output
bsky-sdk/src/moderation/types.rs:404:17:w:warning: variant `List` is never constructed
   --> bsky-sdk/src/moderation/types.rs:406:5
    |
404 | pub(crate) enum ModerationCauseSource {
    |                 --------------------- variant in this enum
405 |     User,
406 |     List(ListViewBasic),
    |     ^^^^
    |
    = note: `ModerationCauseSource` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis


__END__

Check warning on line 411 in bsky-sdk/src/moderation/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] bsky-sdk/src/moderation/types.rs#L411

warning: fields `source`, `label`, and `label_def` are never read
   --> bsky-sdk/src/moderation/types.rs:412:9
    |
411 | pub(crate) struct ModerationCauseLabel {
    |                   -------------------- fields in this struct
412 |     pub source: ModerationCauseSource,
    |         ^^^^^^
413 |     pub label: Label,
    |         ^^^^^
414 |     pub label_def: InterpretedLabelValueDefinition,
    |         ^^^^^^^^^
    |
    = note: `ModerationCauseLabel` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
Raw output
bsky-sdk/src/moderation/types.rs:411:19:w:warning: fields `source`, `label`, and `label_def` are never read
   --> bsky-sdk/src/moderation/types.rs:412:9
    |
411 | pub(crate) struct ModerationCauseLabel {
    |                   -------------------- fields in this struct
412 |     pub source: ModerationCauseSource,
    |         ^^^^^^
413 |     pub label: Label,
    |         ^^^^^
414 |     pub label_def: InterpretedLabelValueDefinition,
    |         ^^^^^^^^^
    |
    = note: `ModerationCauseLabel` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis


__END__

Check warning on line 404 in bsky-sdk/src/moderation/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] bsky-sdk/src/moderation/types.rs#L404

warning: large size difference between variants
   --> bsky-sdk/src/moderation/types.rs:404:1
    |
404 | / pub(crate) enum ModerationCauseSource {
405 | |     User,
406 | |     List(ListViewBasic),
    | |     ------------------- the largest variant contains at least 288 bytes
407 | |     Labeler(Did),
    | |     ------------ the second-largest variant contains at least 24 bytes
408 | | }
    | |_^ the entire enum is at least 288 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
    |
406 |     List(Box<ListViewBasic>),
    |          ~~~~~~~~~~~~~~~~~~
Raw output
bsky-sdk/src/moderation/types.rs:404:1:w:warning: large size difference between variants
   --> bsky-sdk/src/moderation/types.rs:404:1
    |
404 | / pub(crate) enum ModerationCauseSource {
405 | |     User,
406 | |     List(ListViewBasic),
    | |     ------------------- the largest variant contains at least 288 bytes
407 | |     Labeler(Did),
    | |     ------------ the second-largest variant contains at least 24 bytes
408 | | }
    | |_^ the entire enum is at least 288 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
    |
406 |     List(Box<ListViewBasic>),
    |          ~~~~~~~~~~~~~~~~~~


__END__