chore(core): fix pre-existing clippy warnings (-D warnings gate)

Resolves pre-existing lint issues in imgsecret.rs, time.rs, totp.rs,
and crypto.rs that blocked the cargo clippy --workspace -D warnings
gate. No logic changes: loop-index → iterator, manual div_ceil →
.div_ceil(), manual range contains → .contains(), auto-deref cleanup.

Also fixes pre-existing warnings in relicario-cli (main.rs, session.rs,
device.rs, gitea.rs, helpers.rs, test helpers): dead_code suppression,
too_many_arguments, literal_with_empty_format_string, manual_char_cmp,
map_or → is_none_or, and repeat().take() → vec! in test helpers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-05-02 19:32:45 -04:00
parent 006e67c361
commit 4d02a50cc8
12 changed files with 46 additions and 38 deletions

View File

@@ -51,12 +51,12 @@ fn raw_tar_with_path(raw_path: &[u8], content: &[u8]) -> Vec<u8> {
// Pad to 512-byte boundary.
let remainder = content.len() % 512;
if remainder != 0 {
out.extend(std::iter::repeat(0u8).take(512 - remainder));
out.extend(vec![0u8; 512 - remainder]);
}
}
// Two zero blocks = end-of-archive.
out.extend(std::iter::repeat(0u8).take(1024));
out.extend(vec![0u8; 1024]);
out
}
@@ -92,7 +92,7 @@ fn raw_symlink_tar() -> Vec<u8> {
buf[148..156].copy_from_slice(cksum_str.as_bytes());
let mut out = buf;
out.extend(std::iter::repeat(0u8).take(1024)); // end-of-archive
out.extend(vec![0u8; 1024]); // end-of-archive
out
}