Merge patterns

This commit is contained in:
Thomas Eizinger 2021-06-24 19:32:15 +10:00
parent 8fad8fb2b6
commit dffe4351a8
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96

View File

@ -176,24 +176,19 @@ where
HandlerOutEvent::Initiated(send_wallet_snapshot) => {
self.events.push_back(OutEvent::Initiated { send_wallet_snapshot })
}
HandlerOutEvent::Completed(swap_setup_result) => {
match swap_setup_result {
Ok((swap_id, state3)) => {
self.events.push_back(OutEvent::Completed {
peer_id,
swap_id,
state3
})
}
Err(error) => {
self.events.push_back(OutEvent::Error {
peer_id,
error
})
}
}
}
HandlerOutEvent::Completed(Ok((swap_id, state3))) => {
self.events.push_back(OutEvent::Completed {
peer_id,
swap_id,
state3
})
},
HandlerOutEvent::Completed(Err(error)) => {
self.events.push_back(OutEvent::Error {
peer_id,
error
})
},
}
}