Skip to content

Commit 5fae289

Browse files
committed
fix: minimum supported rust version
1 parent 5eed40d commit 5fae289

File tree

1 file changed

+8
-9
lines changed
  • src/parse/text/simple_extensions

1 file changed

+8
-9
lines changed

src/parse/text/simple_extensions/types.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -400,15 +400,14 @@ impl ParameterConstraint {
400400
TypeParamDefsItemType::DataType => Self::DataType,
401401
TypeParamDefsItemType::Boolean => Self::Boolean,
402402
TypeParamDefsItemType::Integer => {
403-
if let Some(min_f) = min
404-
&& min_f.fract() != 0.0
405-
{
406-
return Err(TypeParamError::InvalidIntegerBounds { min, max });
407-
}
408-
if let Some(max_f) = max
409-
&& max_f.fract() != 0.0
410-
{
411-
return Err(TypeParamError::InvalidIntegerBounds { min, max });
403+
match (min, max) {
404+
(Some(min_f), _) if min_f.fract() != 0.0 => {
405+
return Err(TypeParamError::InvalidIntegerBounds { min, max });
406+
}
407+
(_, Some(max_f)) if max_f.fract() != 0.0 => {
408+
return Err(TypeParamError::InvalidIntegerBounds { min, max });
409+
}
410+
_ => (),
412411
}
413412

414413
let min_i = min.map(|v| v as i64);

0 commit comments

Comments
 (0)