Skip to content

add File::resolver #107

add File::resolver

add File::resolver #107

Triggered via push July 30, 2023 08:37
Status Success
Total duration 35s
Artifacts

lint.yml

on: push
check-clippy
27s
check-clippy
Fit to window
Zoom out
Zoom in

Annotations

56 warnings
unused `std::result::Result` that must be used: pdf/src/backend.rs#L95
warning: unused `std::result::Result` that must be used --> pdf/src/backend.rs:95:17 | 95 | refs.add_entries_from(section); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 95 | let _ = refs.add_entries_from(section); | +++++++
manual `!RangeInclusive::contains` implementation: pdf/src/crypt.rs#L321
warning: manual `!RangeInclusive::contains` implementation --> pdf/src/crypt.rs:321:12 | 321 | if key_bits < 1 || key_bits > 256 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=256).contains(&key_bits)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains = note: `#[warn(clippy::manual_range_contains)]` on by default
the borrowed expression implements the required traits: pdf/src/crypt.rs#L188
warning: the borrowed expression implements the required traits --> pdf/src/crypt.rs:188:26 | 188 | hash.consume(&PADDING); | ^^^^^^^^ help: change this to: `PADDING` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
manual implementation of an assign operation: pdf/src/enc.rs#L415
warning: manual implementation of an assign operation --> pdf/src/enc.rs:415:13 | 415 | c = c + 2; // move cursor to next run | ^^^^^^^^^ help: replace it with: `c += 2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern = note: `#[warn(clippy::assign_op_pattern)]` on by default
the following explicit lifetimes could be elided: 'a: pdf/src/build.rs#L127
warning: the following explicit lifetimes could be elided: 'a --> pdf/src/build.rs:127:5 | 127 | pub fn new<'a>(fileoptions: FileOptions<'a, SC, OC, L>) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 127 - pub fn new<'a>(fileoptions: FileOptions<'a, SC, OC, L>) -> Self { 127 + pub fn new(fileoptions: FileOptions<'_, SC, OC, L>) -> Self { |
redundant pattern matching, consider using `is_err()`: pdf/src/font.rs#L524
warning: redundant pattern matching, consider using `is_err()` --> pdf/src/font.rs:524:24 | 524 | 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#L506
warning: redundant pattern matching, consider using `is_err()` --> pdf/src/font.rs:506:24 | 506 | 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 = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
struct `ToUnicodeMap` has a public `len` method, but no `is_empty` method: pdf/src/font.rs#L467
warning: struct `ToUnicodeMap` has a public `len` method, but no `is_empty` method --> pdf/src/font.rs:467:5 | 467 | 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#L447
warning: you should consider adding a `Default` implementation for `ToUnicodeMap` --> pdf/src/font.rs:447:5 | 447 | / pub fn new() -> Self { 448 | | ToUnicodeMap { 449 | | inner: HashMap::new() 450 | | } 451 | | } | |_____^ | = 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 | 446 + impl Default for ToUnicodeMap { 447 + fn default() -> Self { 448 + Self::new() 449 + } 450 + } |
casting to the same type is unnecessary (`usize` -> `usize`): pdf/src/font.rs#L268
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> pdf/src/font.rs:268:38 | 268 | ... for c in (c1 as usize) ..= (c2 as usize) { | ^^^^^^^^^^^^^ help: try: `c1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
dereferencing a tuple pattern where every element takes a reference: pdf/src/font.rs#L249
warning: dereferencing a tuple pattern where every element takes a reference --> pdf/src/font.rs:249:30 | 249 | Some(&Primitive::Array(ref array)) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 249 - Some(&Primitive::Array(ref array)) => { 249 + Some(Primitive::Array(array)) => { |
deref which would be done by auto-deref: pdf/src/parser/mod.rs#L195
warning: deref which would be done by auto-deref --> pdf/src/parser/mod.rs:195:31 | 195 | let mut rest: &[u8] = &*first_lexeme.reslice(1..); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&first_lexeme.reslice(1..)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
casting to the same type is unnecessary (`usize` -> `usize`): pdf/src/parser/mod.rs#L184
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> pdf/src/parser/mod.rs:184:27 | 184 | lexer.set_pos(pos_bk as usize); // (roll back the lexer first) | ^^^^^^^^^^^^^^^ help: try: `pos_bk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): pdf/src/parser/mod.rs#L178
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> pdf/src/parser/mod.rs:178:31 | 178 | lexer.set_pos(pos_bk as usize); // (roll back the lexer first) | ^^^^^^^^^^^^^^^ help: try: `pos_bk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
manual check for common ascii range: pdf/src/parser/lexer/mod.rs#L468
warning: manual check for common ascii range --> pdf/src/parser/lexer/mod.rs:468:23 | 468 | b.iter().all(|&b| matches!(b, b'0'..=b'9')) | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b.is_ascii_digit()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
manual check for common ascii range: pdf/src/parser/lexer/mod.rs#L429
warning: manual check for common ascii range --> pdf/src/parser/lexer/mod.rs:429:56 | 429 | if let Some(len) = slice.iter().position(|&b| !matches!(b, b'0'..=b'9')) { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b.is_ascii_digit()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check = note: `#[warn(clippy::manual_is_ascii_check)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: pdf/src/content.rs#L34
warning: this expression creates a reference which is immediately dereferenced by the compiler --> pdf/src/content.rs:34:15 | 34 | ops.parse(&data, resolve)?; | ^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
deref on an immutable reference: pdf/src/primitive.rs#L668
warning: deref on an immutable reference --> pdf/src/primitive.rs:668:56 | 668 | Primitive::Name(ref s) => Ok(Cow::Borrowed(&*s)), | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref = note: `#[warn(clippy::borrow_deref_ref)]` on by default help: if you would like to reborrow, try removing `&*` | 668 | Primitive::Name(ref s) => Ok(Cow::Borrowed(s)), | ~ help: if you would like to deref, try using `&**` | 668 | Primitive::Name(ref s) => Ok(Cow::Borrowed(&**s)), | ~~~~
dereferencing a tuple pattern where every element takes a reference: pdf/src/primitive.rs#L637
warning: dereferencing a tuple pattern where every element takes a reference --> pdf/src/primitive.rs:637:13 | 637 | &Primitive::Name(ref s) => Ok(Name(s.clone())), | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `#[warn(clippy::needless_borrowed_reference)]` on by default help: try removing the `&` and `ref` parts | 637 - &Primitive::Name(ref s) => Ok(Name(s.clone())), 637 + Primitive::Name(s) => Ok(Name(s.clone())), |
this expression creates a reference which is immediately dereferenced by the compiler: pdf/src/primitive.rs#L268
warning: this expression creates a reference which is immediately dereferenced by the compiler --> pdf/src/primitive.rs:268:31 | 268 | out.write_all(&data)?; | ^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L138
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:138:58 | 138 | XRef::Stream { stream_id, index } => (2, stream_id as u64, index as u64), | ^^^^^^^^^^^^^^^^ help: try: `stream_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L137
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:137:62 | 137 | XRef::Raw { pos, gen_nr } => (1, pos as u64, gen_nr as u64), | ^^^^^^^^^^^^^ help: try: `gen_nr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L136
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:136:72 | 136 | XRef::Free { next_obj_nr, gen_nr } => (0, next_obj_nr, gen_nr as u64), | ^^^^^^^^^^^^^ help: try: `gen_nr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L100
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:100:55 | 100 | XRef::Stream { stream_id, index } => (stream_id as u64, index as u64), | ^^^^^^^^^^^^^^^^ help: try: `stream_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L99
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:99:69 | 99 | XRef::Free { next_obj_nr, gen_nr } => (next_obj_nr, gen_nr as u64), | ^^^^^^^^^^^^^ help: try: `gen_nr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): pdf/src/xref.rs#L98
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> pdf/src/xref.rs:98:59 | 98 | XRef::Raw { pos, gen_nr } => (pos as u64, gen_nr as u64), | ^^^^^^^^^^^^^ help: try: `gen_nr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
deref which would be done by auto-deref: pdf/src/object/mod.rs#L327
warning: deref which would be done by auto-deref --> pdf/src/object/mod.rs:327:42 | 327 | MaybeRef::Indirect(ref r) => &**r | ^^^^ help: try this: `r` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: pdf/src/object/mod.rs#L254
warning: deref which would be done by auto-deref --> pdf/src/object/mod.rs:254:9 | 254 | &*self.data | ^^^^^^^^^^^ help: try this: `&self.data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
use of `default` to create a unit struct: pdf/src/object/mod.rs#L171
warning: use of `default` to create a unit struct --> pdf/src/object/mod.rs:171:36 | 171 | _marker: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
use of `default` to create a unit struct: pdf/src/object/mod.rs#L165
warning: use of `default` to create a unit struct --> pdf/src/object/mod.rs:165:36 | 165 | _marker: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
large size difference between variants: pdf/src/object/types.rs#L519
warning: large size difference between variants --> pdf/src/object/types.rs:519:1 | 519 | / pub enum XObject { 520 | | #[pdf(name="PS")] 521 | | Postscript (PostScriptXObject), | | ------------------------------ the largest variant contains at least 208 bytes 522 | | Image (ImageXObject), | | -------------------- the second-largest variant contains at least 0 bytes 523 | | Form (FormXObject), 524 | | } | |_^ the entire enum is at least 0 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 | 521 | Postscript (Box<PostScriptXObject>), | ~~~~~~~~~~~~~~~~~~~~~~
deref which would be done by auto-deref: pdf/src/object/types.rs#L323
warning: deref which would be done by auto-deref --> pdf/src/object/types.rs:323:29 | 323 | None => inherit(&*self.parent, |pt| pt.resources.as_ref())? | ^^^^^^^^^^^^^ help: try this: `&self.parent` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: pdf/src/object/types.rs#L314
warning: deref which would be done by auto-deref --> pdf/src/object/types.rs:314:35 | 314 | None => match inherit(&*self.parent, |pt| pt.crop_box)? { | ^^^^^^^^^^^^^ help: try this: `&self.parent` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: pdf/src/object/types.rs#L307
warning: deref which would be done by auto-deref --> pdf/src/object/types.rs:307:29 | 307 | None => inherit(&*self.parent, |pt| pt.media_box)? | ^^^^^^^^^^^^^ help: try this: `&self.parent` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
unused variable: `parse_options`: pdf/src/file.rs#L545
warning: unused variable: `parse_options` --> pdf/src/file.rs:545:45 | 545 | let FileOptions { oc, sc, password, parse_options, log } = self; | ^^^^^^^^^^^^^ help: try ignoring the field: `parse_options: _`
unused variable: `password`: pdf/src/file.rs#L545
warning: unused variable: `password` --> pdf/src/file.rs:545:35 | 545 | let FileOptions { oc, sc, password, parse_options, log } = self; | ^^^^^^^^ help: try ignoring the field: `password: _`
unused variable: `depth`: pdf/src/file.rs#L284
warning: unused variable: `depth` --> pdf/src/file.rs:284:61 | 284 | fn resolve_flags(&self, r: PlainRef, flags: ParseFlags, depth: usize) -> Result<Primitive> { | ^^^^^ help: if this is intentional, prefix it with an underscore: `_depth`
unused variable: `r`: pdf/src/file.rs#L60
warning: unused variable: `r` --> pdf/src/file.rs:60:23 | 60 | fn log_get(&self, r: PlainRef) {} | ^ help: if this is intentional, prefix it with an underscore: `_r`
unused variable: `r`: pdf/src/file.rs#L59
warning: unused variable: `r` --> pdf/src/file.rs:59:27 | 59 | fn load_object(&self, r: PlainRef) {} | ^ help: if this is intentional, prefix it with an underscore: `_r`
unused variable: `key`: pdf/src/file.rs#L46
warning: unused variable: `key` --> pdf/src/file.rs:46:30 | 46 | fn get_or_compute(&self, key: PlainRef, compute: impl FnOnce() -> T) -> T { | ^^^ help: if this is intentional, prefix it with an underscore: `_key`
unused variable: `update`: pdf/src/primitive.rs#L770
warning: unused variable: `update` --> pdf/src/primitive.rs:770:28 | 770 | fn to_primitive(&self, update: &mut impl Updater) -> Result<Primitive> { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_update`
unused variable: `file_range`: pdf/src/primitive.rs#L264
warning: unused variable: `file_range` --> pdf/src/primitive.rs:264:39 | 264 | StreamInner::InFile { id, ref file_range } => { | ^^^^^^^^^^^^^^ help: try ignoring the field: `file_range: _`
unused variable: `id`: pdf/src/primitive.rs#L264
warning: unused variable: `id` --> pdf/src/primitive.rs:264:35 | 264 | StreamInner::InFile { id, ref file_range } => { | ^^ help: try ignoring the field: `id: _`
unused variable: `offset`: pdf/src/file.rs#L213
warning: unused variable: `offset` --> pdf/src/file.rs:213:43 | 213 | ... if let Ok(offset) = lexer.next() { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_offset` | = note: `#[warn(unused_variables)]` on by default
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L643
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:643:48 | 643 | let checks_code = attrs.checks.iter().map(|&(ref key, ref val)| | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 643 - let checks_code = attrs.checks.iter().map(|&(ref key, ref val)| 643 + let checks_code = attrs.checks.iter().map(|(key, val)| |
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L618
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:618:12 | 618 | .map( |&(ref field, ref attrs, ref opt)| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 618 - .map( |&(ref field, ref attrs, ref opt)| 618 + .map( |(field, attrs, opt)| |
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L574
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:574:51 | 574 | let checks: Vec<_> = attrs.checks.iter().map(|&(ref key, ref val)| | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `#[warn(clippy::needless_borrowed_reference)]` on by default help: try removing the `&` and `ref` parts | 574 - let checks: Vec<_> = attrs.checks.iter().map(|&(ref key, ref val)| 574 + let checks: Vec<_> = attrs.checks.iter().map(|(key, val)| |
unused import: `std::cell::RefCell`: pdf/src/file.rs#L2
warning: unused import: `std::cell::RefCell` --> pdf/src/file.rs:2:5 | 2 | use std::cell::RefCell; | ^^^^^^^^^^^^^^^^^^
unused imports: `BTreeMap`, `btree_map`: pdf/src/primitive.rs#L4
warning: unused imports: `BTreeMap`, `btree_map` --> pdf/src/primitive.rs:4:24 | 4 | use std::collections::{btree_map, BTreeMap}; | ^^^^^^^^^ ^^^^^^^^
unused import: `RcRef`: pdf/src/primitive.rs#L2
warning: unused import: `RcRef` --> pdf/src/primitive.rs:2:81 | 2 | use crate::object::{PlainRef, Resolve, Object, NoResolve, ObjectWrite, Updater, RcRef}; | ^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused variable: `opt`: pdf_derive/src/lib.rs#L618
warning: unused variable: `opt` --> pdf_derive/src/lib.rs:618:40 | 618 | .map( |&(ref field, ref attrs, ref opt)| | ^^^ help: if this is intentional, prefix it with an underscore: `_opt` | = note: `#[warn(unused_variables)]` on by default
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L643
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:643:48 | 643 | let checks_code = attrs.checks.iter().map(|&(ref key, ref val)| | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 643 - let checks_code = attrs.checks.iter().map(|&(ref key, ref val)| 643 + let checks_code = attrs.checks.iter().map(|(key, val)| |
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L618
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:618:12 | 618 | .map( |&(ref field, ref attrs, ref opt)| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 618 - .map( |&(ref field, ref attrs, ref opt)| 618 + .map( |(field, attrs, opt)| |
dereferencing a tuple pattern where every element takes a reference: pdf_derive/src/lib.rs#L574
warning: dereferencing a tuple pattern where every element takes a reference --> pdf_derive/src/lib.rs:574:51 | 574 | let checks: Vec<_> = attrs.checks.iter().map(|&(ref key, ref val)| | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `#[warn(clippy::needless_borrowed_reference)]` on by default help: try removing the `&` and `ref` parts | 574 - let checks: Vec<_> = attrs.checks.iter().map(|&(ref key, ref val)| 574 + let checks: Vec<_> = attrs.checks.iter().map(|(key, val)| |
unused variable: `opt`: pdf_derive/src/lib.rs#L618
warning: unused variable: `opt` --> pdf_derive/src/lib.rs:618:40 | 618 | .map( |&(ref field, ref attrs, ref opt)| | ^^^ help: if this is intentional, prefix it with an underscore: `_opt` | = note: `#[warn(unused_variables)]` on by default
check-clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/