Skip to content

Commit 7c41228

Browse files
Update state_machine.rs
1 parent cffd665 commit 7c41228

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/state_machine.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ impl IntentState {
2323
event: TransitionEvent,
2424
) -> Result<IntentState, &'static str> {
2525
match (self, event) {
26-
(
27-
IntentState::Committed
28-
| IntentState::Completed
26+
(
27+
IntentState::Completed
2928
| IntentState::Refunded
3029
| IntentState::Invalid,
3130
_
@@ -59,11 +58,3 @@ mod tests {
5958
assert_eq!(new_state, IntentState::Committed);
6059
}
6160
}
62-
#[test]
63-
fn committed_is_terminal() {
64-
let state = IntentState::Committed;
65-
66-
let result = state.transition(TransitionEvent::Timeout);
67-
68-
assert!(result.is_err());
69-
}

0 commit comments

Comments
 (0)