Skip to content

Commit f145243

Browse files
style(clients): satisfy eslint and rustfmt on the infinity arm check
Co-Authored-By: jason.han <hanhuijun@gmail.com>
1 parent 0f4beea commit f145243

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

clients/node/src/core/values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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" };

clients/rust/opensysml/src/domain.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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)],

0 commit comments

Comments
 (0)