diff --git a/src/miniscript/types/extra_props.rs b/src/miniscript/types/extra_props.rs index 959157a8b..c28bb121f 100644 --- a/src/miniscript/types/extra_props.rs +++ b/src/miniscript/types/extra_props.rs @@ -1037,7 +1037,7 @@ impl Property for ExtData { // Note that for CLTV this is a limitation not of Bitcoin but Miniscript. The // number on the stack would be a 5 bytes signed integer but Miniscript's B type // only consumes 4 bytes from the stack. - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime, @@ -1046,7 +1046,7 @@ impl Property for ExtData { Ok(Self::from_after(t)) } Terminal::Older(t) => { - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime, diff --git a/src/miniscript/types/mod.rs b/src/miniscript/types/mod.rs index 33b246481..d6a43bccd 100644 --- a/src/miniscript/types/mod.rs +++ b/src/miniscript/types/mod.rs @@ -439,7 +439,7 @@ pub trait Property: Sized { // Note that for CLTV this is a limitation not of Bitcoin but Miniscript. The // number on the stack would be a 5 bytes signed integer but Miniscript's B type // only consumes 4 bytes from the stack. - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime, @@ -448,7 +448,7 @@ pub trait Property: Sized { Ok(Self::from_after(t)) } Terminal::Older(t) => { - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime, @@ -822,7 +822,7 @@ impl Property for Type { // Note that for CLTV this is a limitation not of Bitcoin but Miniscript. The // number on the stack would be a 5 bytes signed integer but Miniscript's B type // only consumes 4 bytes from the stack. - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime, @@ -831,7 +831,7 @@ impl Property for Type { Ok(Self::from_after(t)) } Terminal::Older(t) => { - if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) == 1 { + if t == 0 || (t & SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0 { return Err(Error { fragment: fragment.clone(), error: ErrorKind::InvalidTime,