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 Oct 28, 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.75.0-nightly (2f1bd0729 2023-10-27)
  • cargo 1.75.0-nightly (df3509237 2023-10-24)
  • clippy 0.1.75 (2f1bd07 2023-10-27)

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)]`