From 9da96e1d46ea8008bba2237fdba618f91f18adb6 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 17 Aug 2018 10:08:56 -0700 Subject: [PATCH] Fix compilation warning when comparing usize and u64 on 32-bit arch --- src/blockdata/script.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blockdata/script.rs b/src/blockdata/script.rs index 3c68bd9..7e8b867 100644 --- a/src/blockdata/script.rs +++ b/src/blockdata/script.rs @@ -512,8 +512,8 @@ impl Builder { /// Adds instructions to push some arbitrary data onto the stack pub fn push_slice(mut self, data: &[u8]) -> Builder { // Start with a PUSH opcode - match data.len() { - n if n < opcodes::Ordinary::OP_PUSHDATA1 as usize => { self.0.push(n as u8); }, + match data.len() as u64 { + n if n < opcodes::Ordinary::OP_PUSHDATA1 as u64 => { self.0.push(n as u8); }, n if n < 0x100 => { self.0.push(opcodes::Ordinary::OP_PUSHDATA1 as u8); self.0.push(n as u8);