Clippy fixes

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andy Dixon
2026-10-08 12:24:37 +01:00
co-authored by Claude
parent 91d49aeecf
commit 7506c1dbef
2 changed files with 7 additions and 7 deletions
+5 -4
View File
@@ -479,10 +479,11 @@ fn run(cmd: &str, args: &[String]) -> Result<i32> {
let mut cat = s.catalogue()?;
// Never ingest, or delete, the vault, anything inside it, or its key.
let vault_dir = ctx.vault_dir()?;
if let (Ok(v), Ok(src)) = (std::fs::canonicalize(&vault_dir), std::fs::canonicalize(&pos[0])) {
if src != v && src.starts_with(&v) {
crate::bail!("{} is inside the vault", pos[0]);
}
if let (Ok(v), Ok(src)) = (std::fs::canonicalize(&vault_dir), std::fs::canonicalize(&pos[0]))
&& src != v
&& src.starts_with(&v)
{
crate::bail!("{} is inside the vault", pos[0]);
}
let skip: Vec<FileId> = [vault_dir, ctx.key()?].iter().filter_map(|p| FileId::of(p, true)).collect();
let yes = ctx.flags.yes;
+2 -3
View File
@@ -169,10 +169,9 @@ fn go_pem_decode(data: &[u8]) -> Option<(Vec<u8>, Vec<u8>, &[u8])> {
loop {
if rest.starts_with(&START[1..]) {
rest = &rest[START.len() - 1..];
} else if let Some(i) = find(rest, START) {
rest = &rest[i + START.len()..];
} else {
return None;
let i = find(rest, START)?;
rest = &rest[i + START.len()..];
}
let (type_line, r) = get_line(rest);
rest = r;