File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/parse/text/simple_extensions Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments