chore: fix linting issues caused to update of rust/clippy to newer version
This commit is contained in:
@@ -83,7 +83,10 @@ impl FileManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn extract_filename_from_path(full_path: &str) -> &str {
|
fn extract_filename_from_path(full_path: &str) -> &str {
|
||||||
full_path.split(['/', '\\']).last().unwrap_or(full_path)
|
full_path
|
||||||
|
.split(['/', '\\'])
|
||||||
|
.next_back()
|
||||||
|
.unwrap_or(full_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_download_path_from_filename(
|
fn create_download_path_from_filename(
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ pub fn deflate(input: &[u8]) -> Result<Vec<u8>> {
|
|||||||
return Err(SoulseekRs::CompressionError("invalid CINFO".to_string()));
|
return Err(SoulseekRs::CompressionError("invalid CINFO".to_string()));
|
||||||
}
|
}
|
||||||
let flg = r.read_byte()?;
|
let flg = r.read_byte()?;
|
||||||
if ((cmf as u32) * 256 + (flg as u32)) % 31 != 0 {
|
if !((cmf as u32) * 256 + (flg as u32)).is_multiple_of(31) {
|
||||||
return Err(SoulseekRs::CompressionError(
|
return Err(SoulseekRs::CompressionError(
|
||||||
"CMF+FLG checksum failed".to_string(),
|
"CMF+FLG checksum failed".to_string(),
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user