Skip to content

Dropped data iterators since they seemed like an unnecessary abstract… #10

Dropped data iterators since they seemed like an unnecessary abstract…

Dropped data iterators since they seemed like an unnecessary abstract… #10

GitHub Actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in succeeded Oct 25, 2024 in 3s

Clippy (Stable ~ Linux/x86_64)

Clippy was successful!

Details

Running cargo clippy took roughly ~3485ms to complete

  • Working Directory: repository directory

Annotations

Check warning on line 9 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L9

unused imports: `PathBuf` and `Path`
Raw output
warning: unused imports: `PathBuf` and `Path`
 --> src/bluefile.rs:9:17
  |
9 | use std::path::{Path, PathBuf};
  |                 ^^^^  ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 14 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L14

unused import: `crate::header::Header`
Raw output
warning: unused import: `crate::header::Header`
  --> src/bluefile.rs:14:5
   |
14 | use crate::header::Header;
   |     ^^^^^^^^^^^^^^^^^^^^^

Check warning on line 1 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L1

unused import: `std::fs::File`
Raw output
warning: unused import: `std::fs::File`
 --> src/util.rs:1:5
  |
1 | use std::fs::File;
  |     ^^^^^^^^^^^^^

Check warning on line 2 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L2

unused import: `std::path::PathBuf`
Raw output
warning: unused import: `std::path::PathBuf`
 --> src/util.rs:2:5
  |
2 | use std::path::PathBuf;
  |     ^^^^^^^^^^^^^^^^^^

Check warning on line 50 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L50

field `offset` is never read
Raw output
warning: field `offset` is never read
  --> src/bluefile.rs:50:5
   |
47 | pub struct ExtHeaderIter {
   |            ------------- field in this struct
...
50 |     offset: usize,
   |     ^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 57 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L57

associated function `new` is never used
Raw output
warning: associated function `new` is never used
  --> src/bluefile.rs:57:8
   |
56 | impl ExtHeaderIter {
   | ------------------ associated function in this implementation
57 |     fn new(file: File, offset: usize, size: usize, endianness: Endianness) -> Result<Self> {
   |        ^^^

Check warning on line 164 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L164

writing `&Vec` instead of `&[_]` involves a new object where a slice will do
Raw output
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
   --> src/data_type.rs:164:79
    |
164 | pub fn bytes_to_data_value(data_type: &DataType, endianness: Endianness, buf: &Vec<u8>) -> Result<DataValue> {
    |                                                                               ^^^^^^^^ help: change this to: `&[u8]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
    = note: `#[warn(clippy::ptr_arg)]` on by default

Check warning on line 13 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/lib.rs#L13

unneeded `return` statement
Raw output
warning: unneeded `return` statement
  --> src/util.rs:13:19
   |
13 |         Err(_) => return Err(Error::ByteConversionError),
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
13 |         Err(_) => Err(Error::ByteConversionError),
   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 45 in /home/runner/work/bluefile/bluefile/src/bluejay.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/bluejay.rs#L45

redundant field names in struct initialization
Raw output
warning: redundant field names in struct initialization
  --> src/bluejay.rs:45:9
   |
45 |         file: file,
   |         ^^^^^^^^^^ help: replace it with: `file`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
   = note: `#[warn(clippy::redundant_field_names)]` on by default

Check warning on line 31 in /home/runner/work/bluefile/bluefile/src/bluejay.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.82.0 (f6e511eec 2024-10-15) in

/home/runner/work/bluefile/bluefile/src/bluejay.rs#L31

length comparison to zero
Raw output
warning: length comparison to zero
  --> src/bluejay.rs:31:8
   |
31 |     if path_str.len() == 0 {
   |        ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path_str.is_empty()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
   = note: `#[warn(clippy::len_zero)]` on by default