Skip to content

clippy

clippy #114

Triggered via push September 6, 2023 11:25
Status Success
Total duration 49s
Artifacts

test.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

14 warnings
redundant pattern matching, consider using `is_err()`: pdf/src/font.rs#L566
warning: redundant pattern matching, consider using `is_err()` --> pdf/src/font.rs:566:24 | 566 | if let Err(_) = a { | -------^^^^^^---- help: try this: `if a.is_err()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
redundant pattern matching, consider using `is_err()`: pdf/src/font.rs#L548
warning: redundant pattern matching, consider using `is_err()` --> pdf/src/font.rs:548:24 | 548 | if let Err(_) = a { | -------^^^^^^---- help: try this: `if a.is_err()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
struct `ToUnicodeMap` has a public `len` method, but no `is_empty` method: pdf/src/font.rs#L509
warning: struct `ToUnicodeMap` has a public `len` method, but no `is_empty` method --> pdf/src/font.rs:509:5 | 509 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` on by default
you should consider adding a `Default` implementation for `ToUnicodeMap`: pdf/src/font.rs#L489
warning: you should consider adding a `Default` implementation for `ToUnicodeMap` --> pdf/src/font.rs:489:5 | 489 | / pub fn new() -> Self { 490 | | ToUnicodeMap { 491 | | inner: HashMap::new() 492 | | } 493 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 488 + impl Default for ToUnicodeMap { 489 + fn default() -> Self { 490 + Self::new() 491 + } 492 + } |
redundant pattern matching, consider using `is_ok()`: pdf/src/file.rs#L212
warning: redundant pattern matching, consider using `is_ok()` --> pdf/src/file.rs:212:40 | 212 | ... if let Ok(_) = lexer.next() { | -------^^^^^--------------- help: try this: `if lexer.next().is_ok()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
tests
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
tests: pdf/src/parser/mod.rs#L15
private item shadows public glob re-export
tests: pdf/src/parser/mod.rs#L15
private item shadows public glob re-export
tests: pdf/src/font.rs#L700
function `string_to_utf16be` is never used
tests
`pdf` (lib) generated 2 warnings (1 duplicate)
tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/