chore: update dependencies and fix clippy warnings
- refresh Cargo.lock to latest compatible crates - simplify u32->u64 conversion in libnres - use is_multiple_of in unpacker list validation
This commit is contained in:
779
Cargo.lock
generated
779
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,7 @@ use crate::error::ConverterError;
|
||||
|
||||
/// Method for converting u32 to u64.
|
||||
pub fn u32_to_u64(value: u32) -> Result<u64, ConverterError> {
|
||||
match u64::try_from(value) {
|
||||
Err(error) => Err(ConverterError::Infallible(error)),
|
||||
Ok(result) => Ok(result),
|
||||
}
|
||||
Ok(u64::from(value))
|
||||
}
|
||||
|
||||
/// Method for converting u32 to usize.
|
||||
|
||||
@@ -73,7 +73,7 @@ fn unpack(input: String, output: String) {
|
||||
.unwrap();
|
||||
reader.read_exact(&mut list_buffer).unwrap();
|
||||
|
||||
if list_buffer.len() % 64 != 0 {
|
||||
if !list_buffer.len().is_multiple_of(64) {
|
||||
panic!("invalid files list")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user