better test, avoid duplicated events

This commit is contained in:
Bernardo 2019-01-22 18:38:34 +01:00 committed by Aleksey Kladov
parent 0a08650852
commit be14ab217c
3 changed files with 30 additions and 22 deletions

View file

@ -55,7 +55,12 @@ pub enum TaskResult {
impl fmt::Debug for TaskResult {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("TaskResult { ... }")
match self {
TaskResult::AddRoot(..) => f.write_str("TaskResult::AddRoot(..)"),
TaskResult::HandleChange(c) => write!(f, "TaskResult::HandleChange({:?})", c),
TaskResult::LoadChange(c) => write!(f, "TaskResult::LoadChange({:?})", c),
TaskResult::NoOp => f.write_str("TaskResult::NoOp"),
}
}
}