Skip to content

downstreaming sha1dir #88

downstreaming sha1dir

downstreaming sha1dir #88

GitHub Actions / Clippy Output failed Dec 10, 2024 in 1s

Clippy Output

1 error, 5 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 5
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 85 in src/util/sha1dir.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> src/util/sha1dir.rs:85:33
   |
85 |     let metadata = fs::metadata(&filename).expect("unable to read metadata");
   |                                 ^^^^^^^^^ help: change this to: `filename`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 84 in src/util/sha1dir.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> src/util/sha1dir.rs:84:28
   |
84 |     let mut f = File::open(&filename).expect("no file found");
   |                            ^^^^^^^^^ help: change this to: `filename`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check failure on line 87 in src/util/sha1dir.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

read amount is not handled

error: read amount is not handled
  --> src/util/sha1dir.rs:87:5
   |
87 |     f.read(&mut buffer).expect("buffer overflow");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `Read::read_exact` instead, or handle partial reads
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
   = note: `#[deny(clippy::unused_io_amount)]` on by default

Check warning on line 18 in src/util/command_line.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> src/util/command_line.rs:18:6
   |
18 | impl<'a, W0: Write, W1: Write> Write for TeeWriter<'a, W0, W1> {
   |      ^^                                            ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
18 - impl<'a, W0: Write, W1: Write> Write for TeeWriter<'a, W0, W1> {
18 + impl<W0: Write, W1: Write> Write for TeeWriter<'_, W0, W1> {
   |

Check warning on line 296 in src/package/mod.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the following explicit lifetimes could be elided: 'de

warning: the following explicit lifetimes could be elided: 'de
   --> src/package/mod.rs:296:6
    |
296 | impl<'de> Visitor<'de> for VersioningVisitor {
    |      ^^^          ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
296 - impl<'de> Visitor<'de> for VersioningVisitor {
296 + impl Visitor<'_> for VersioningVisitor {
    |

Check warning on line 107 in src/backends/lfc.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> src/backends/lfc.rs:107:6
    |
107 | impl<'a> Display for LfcJsonArgs<'a> {
    |      ^^                          ^^
    |
    = 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
    |
107 - impl<'a> Display for LfcJsonArgs<'a> {
107 + impl Display for LfcJsonArgs<'_> {
    |