File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ export function decodeValue(value: Value | undefined): SysMLValue {
181181 return { kind : "unset" } ;
182182 case "infinity" :
183183 // Only an asserted arm carries the unbounded value.
184- if ( kind . value !== true ) {
184+ if ( ! kind . value ) {
185185 throw new MalformedValueError ( "the infinity arm states no value unless it is true" ) ;
186186 }
187187 return { kind : "infinity" } ;
Original file line number Diff line number Diff line change @@ -932,10 +932,7 @@ mod tests {
932932 kind : Some ( wire:: value:: Kind :: Infinity ( asserted) ) ,
933933 } ;
934934 assert_eq ! ( value_from_wire( arm( true ) ) . ok( ) , Some ( Value :: Infinity ) ) ;
935- assert ! ( matches!(
936- value_from_wire( arm( false ) ) ,
937- Err ( Error :: Decode ( _) )
938- ) ) ;
935+ assert ! ( matches!( value_from_wire( arm( false ) ) , Err ( Error :: Decode ( _) ) ) ) ;
939936 let nested = wire:: Value {
940937 kind : Some ( wire:: value:: Kind :: Sequence ( wire:: ValueSequence {
941938 elements : vec ! [ arm( false ) ] ,
You can’t perform that action at this time.
0 commit comments