From 0ec360b36227bcd0570c372cc75b350eed7c3583 Mon Sep 17 00:00:00 2001 From: desbma Date: Tue, 21 May 2024 14:34:24 +0200 Subject: [PATCH] fix: clippy false positive --- src/strace/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/strace/parser.rs b/src/strace/parser.rs index 604f670..935bb7d 100644 --- a/src/strace/parser.rs +++ b/src/strace/parser.rs @@ -312,7 +312,11 @@ fn parse_argument(caps: ®ex::Captures) -> anyhow::Result { let v = parse_argument(&caps)?; // dbg!(&v); members.insert(k.to_owned(), v); - struct_ = struct_[k.len() + 1 + caps.get(0).unwrap().len()..struct_.len()].to_owned(); + #[allow(clippy::assigning_clones)] + { + struct_ = + struct_[k.len() + 1 + caps.get(0).unwrap().len()..struct_.len()].to_owned(); + } } Ok(SyscallArg::Struct(members)) } else if let Some(array) = caps.name("array") {