From 2275ce487713ae62b8c4382f2bb280b8680134ba Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 5 Sep 2023 22:16:42 +0200 Subject: [PATCH] Use || instead of | --- src/valid/expression.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/valid/expression.rs b/src/valid/expression.rs index 548b6c1451..7a8385dba9 100644 --- a/src/valid/expression.rs +++ b/src/valid/expression.rs @@ -893,7 +893,7 @@ impl super::Validator { let arg3_ty = arg3.map(resolve); match fun { Mf::Abs => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } let good = match *arg_ty { @@ -979,7 +979,7 @@ impl super::Validator { | Mf::Sign | Mf::Sqrt | Mf::InverseSqrt => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1015,7 +1015,7 @@ impl super::Validator { } } Mf::Modf | Mf::Frexp => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } if !matches!( @@ -1147,7 +1147,7 @@ impl super::Validator { } } Mf::Normalize => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1227,7 +1227,7 @@ impl super::Validator { } } Mf::Inverse | Mf::Determinant => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } let good = match *arg_ty { @@ -1239,7 +1239,7 @@ impl super::Validator { } } Mf::Transpose => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1253,7 +1253,7 @@ impl super::Validator { | Mf::ReverseBits | Mf::FindLsb | Mf::FindMsb => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1350,7 +1350,7 @@ impl super::Validator { } } Mf::Pack2x16unorm | Mf::Pack2x16snorm | Mf::Pack2x16float => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1363,7 +1363,7 @@ impl super::Validator { } } Mf::Pack4x8snorm | Mf::Pack4x8unorm => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty { @@ -1380,7 +1380,7 @@ impl super::Validator { | Mf::Unpack2x16unorm | Mf::Unpack4x8snorm | Mf::Unpack4x8unorm => { - if arg1_ty.is_some() | arg2_ty.is_some() | arg3_ty.is_some() { + if arg1_ty.is_some() || arg2_ty.is_some() || arg3_ty.is_some() { return Err(ExpressionError::WrongArgumentCount(fun)); } match *arg_ty {