From a290b74805058818f3bac7576c441823610f59b3 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 11 Apr 2023 10:37:47 -0400 Subject: [PATCH] Tweak processor's slice handling due to a CI failure The prior code worked without issue for me locally, but apparently it didn't always. --- processor/src/scanner.rs | 2 +- processor/src/signer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/processor/src/scanner.rs b/processor/src/scanner.rs index 9fdf8492..473ca0d9 100644 --- a/processor/src/scanner.rs +++ b/processor/src/scanner.rs @@ -85,7 +85,7 @@ impl ScannerDb { // Don't add this key if it's already present let mut i = 0; while i < keys.len() { - if keys[i .. (i + key_len)].as_ref() == key_bytes.as_ref() { + if &keys[i .. (i + key_len)] == key_bytes.as_ref() { debug!("adding {} as an active key yet it was already present", hex::encode(key_bytes)); return; } diff --git a/processor/src/signer.rs b/processor/src/signer.rs index 1887d9ad..72eed75d 100644 --- a/processor/src/signer.rs +++ b/processor/src/signer.rs @@ -61,7 +61,7 @@ impl SignerDb { let mut i = 0; while i < existing.len() { - if existing[i .. (i + tx_len)].as_ref() == tx.as_ref() { + if &existing[i .. (i + tx_len)] == tx.as_ref() { return; } i += tx_len;