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

Triggered via push October 25, 2024 03:14
Status Success
Total duration 29s
Artifacts

check.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

20 warnings
/home/runner/work/bluefile/bluefile/src/lib.rs#L9
unused imports: `PathBuf` and `Path`
/home/runner/work/bluefile/bluefile/src/lib.rs#L14
unused import: `crate::header::Header`
/home/runner/work/bluefile/bluefile/src/lib.rs#L1
unused import: `std::fs::File`
/home/runner/work/bluefile/bluefile/src/lib.rs#L2
unused import: `std::path::PathBuf`
/home/runner/work/bluefile/bluefile/src/lib.rs#L50
field `offset` is never read
/home/runner/work/bluefile/bluefile/src/lib.rs#L57
associated function `new` is never used
/home/runner/work/bluefile/bluefile/src/lib.rs#L164
writing `&Vec` instead of `&[_]` involves a new object where a slice will do
/home/runner/work/bluefile/bluefile/src/lib.rs#L13
unneeded `return` statement
/home/runner/work/bluefile/bluefile/src/bluejay.rs#L45
redundant field names in struct initialization
/home/runner/work/bluefile/bluefile/src/bluejay.rs#L31
length comparison to zero
unused imports: `PathBuf` and `Path`: src/lib.rs#L9
warning: unused imports: `PathBuf` and `Path` --> src/bluefile.rs:9:17 | 9 | use std::path::{Path, PathBuf}; | ^^^^ ^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `crate::header::Header`: src/lib.rs#L14
warning: unused import: `crate::header::Header` --> src/bluefile.rs:14:5 | 14 | use crate::header::Header; | ^^^^^^^^^^^^^^^^^^^^^
unused import: `std::fs::File`: src/lib.rs#L1
warning: unused import: `std::fs::File` --> src/util.rs:1:5 | 1 | use std::fs::File; | ^^^^^^^^^^^^^
unused import: `std::path::PathBuf`: src/lib.rs#L2
warning: unused import: `std::path::PathBuf` --> src/util.rs:2:5 | 2 | use std::path::PathBuf; | ^^^^^^^^^^^^^^^^^^
field `offset` is never read: src/lib.rs#L50
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
associated function `new` is never used: src/lib.rs#L57
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> { | ^^^
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/lib.rs#L164
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
unneeded `return` statement: src/lib.rs#L13
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), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 warnings emitted
warning: 8 warnings emitted
redundant field names in struct initialization: src/bluejay.rs#L45
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