Skip to content

fix: add lint ignores to paperclip unit struct (#514) #104

fix: add lint ignores to paperclip unit struct (#514)

fix: add lint ignores to paperclip unit struct (#514) #104

GitHub Actions / clippy failed Nov 20, 2023 in 0s

clippy

3 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 3
Warning 0
Note 0
Help 0

Versions

  • rustc 1.76.0-nightly (9a66e4471 2023-11-19)
  • cargo 1.76.0-nightly (9765a449d 2023-11-17)
  • clippy 0.1.76 (9a66e44 2023-11-19)

Annotations

Check failure on line 1008 in src/v2/codegen/object.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `self.variants().get(0)`

error: accessing first element with `self.variants().get(0)`
    --> src/v2/codegen/object.rs:1008:28
     |
1008 |         if let Some(var) = self.variants().get(0) {
     |                            ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.variants().first()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first

Check failure on line 991 in src/v2/codegen/impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `field.delimiting.get(0)`

error: accessing first element with `field.delimiting.get(0)`
   --> src/v2/codegen/impls.rs:991:48
    |
991 |         if let Some(CollectionFormat::Multi) = field.delimiting.get(0) {
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `field.delimiting.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first

Check failure on line 929 in src/v2/codegen/impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `field.delimiting.get(0)`

error: accessing first element with `field.delimiting.get(0)`
   --> src/v2/codegen/impls.rs:929:48
    |
929 |         if let Some(CollectionFormat::Multi) = field.delimiting.get(0) {
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `field.delimiting.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-D clippy::get-first` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::get_first)]`