提交 4c46296f 编写于 作者: A Andreas Liljeqvist

fix match

上级 05cd48b0
......@@ -811,8 +811,10 @@ pub struct Scalar {
impl Scalar {
#[inline]
pub fn is_bool(&self) -> bool {
matches!(self.value, Int(I8, false))
&& matches!(self.valid_range, WrappingRange { start: 0, end: 1 })
matches!(
self,
Scalar { value: Int(I8, false), valid_range: WrappingRange { start: 0, end: 1 } }
)
}
/// Returns `true` if all possible numbers are valid, i.e `valid_range` covers the whole layout
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册