fix match
This commit is contained in:
parent
05cd48b008
commit
4c46296f22
1 changed files with 4 additions and 2 deletions
|
@ -811,8 +811,10 @@ pub struct Scalar {
|
||||||
impl Scalar {
|
impl Scalar {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_bool(&self) -> bool {
|
pub fn is_bool(&self) -> bool {
|
||||||
matches!(self.value, Int(I8, false))
|
matches!(
|
||||||
&& matches!(self.valid_range, WrappingRange { start: 0, end: 1 })
|
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
|
/// Returns `true` if all possible numbers are valid, i.e `valid_range` covers the whole layout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue