Skip to content

Implemented Display for DataValue and added an example for reading Ty… #7

Implemented Display for DataValue and added an example for reading Ty…

Implemented Display for DataValue and added an example for reading Ty… #7

GitHub Actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in succeeded Jul 24, 2024 in 4s

Clippy (Stable ~ Linux/x86_64)

Clippy was successful!

Details

Running cargo clippy took roughly ~4488ms to complete

  • Working Directory: repository directory

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

unreachable pattern
Raw output
warning: unreachable pattern
   --> src/data_type.rs:156:9
    |
156 |         _ => Err(Error::UnknownDataTypeError),
    |         ^
    |
    = note: `#[warn(unreachable_patterns)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

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

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

fields `offset` and `adjunct` are never read
Raw output
warning: fields `offset` and `adjunct` are never read
  --> src/type1000.rs:35:5
   |
32 | pub struct Type1000DataIter {
   |            ---------------- fields in this struct
...
35 |     offset: usize,
   |     ^^^^^^
...
39 |     adjunct: Type1000Adjunct,
   |     ^^^^^^^

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

fields `offset` and `adjunct` are never read
Raw output
warning: fields `offset` and `adjunct` are never read
  --> src/type2000.rs:39:5
   |
36 | pub struct Type2000DataIter {
   |            ---------------- fields in this struct
...
39 |     offset: usize,
   |     ^^^^^^
...
43 |     adjunct: Type2000Adjunct,
   |     ^^^^^^^

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

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:142:79
    |
142 | 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 3 in /home/runner/work/bluefile/bluefile/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:3:5
  |
3 |     NotBlueFileError,
  |     ^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
  = note: `#[warn(clippy::enum_variant_names)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:4:5
  |
4 |     TypeCodeMismatchError,
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:5:5
  |
5 |     UnknownRankError,
  |     ^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:6:5
  |
6 |     UnknownFormatError,
  |     ^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:7:5
  |
7 |     UnknownDataTypeError,
  |     ^^^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
 --> src/error.rs:9:5
  |
9 |     ByteConversionError,
  |     ^^^^^^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:10:5
   |
10 |     FileOpenError(String),
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:11:5
   |
11 |     FileReadError,
   |     ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:16:5
   |
16 |     HeaderSeekError,
   |     ^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:17:5
   |
17 |     AdjunctHeaderSeekError,
   |     ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:18:5
   |
18 |     ExtHeaderSeekError,
   |     ^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:19:5
   |
19 |     HeaderKeywordParseError,
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:20:5
   |
20 |     HeaderKeywordLengthParseError,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:21:5
   |
21 |     ExtHeaderKeywordLengthParseError,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:22:5
   |
22 |     ExtHeaderKeywordReadError,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

variant name ends with the enum's name
Raw output
warning: variant name ends with the enum's name
  --> src/error.rs:23:5
   |
23 |     DataSeekError,
   |     ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names

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

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.79.0 (129f3b996 2024-06-10) in

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

unneeded `return` statement
Raw output
warning: unneeded `return` statement
  --> src/util.rs:21:19
   |
21 |         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`
   |
21 |         Err(_) => Err(Error::ByteConversionError),
   |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~