Method
run_command
(&self, system: &mut Self::System, cmd: &Self::Command)
Source from the content-addressed store, hash-verified
| 259 | } |
| 260 | |
| 261 | fn run_command(&self, system: &mut Self::System, cmd: &Self::Command) -> Self::Result { |
| 262 | use CounterCommand::*; |
| 263 | match cmd { |
| 264 | Get => return Some(system.get()), |
| 265 | Inc => system.inc(), |
| 266 | Dec => system.dec(), |
| 267 | Reset => system.reset(), |
| 268 | } |
| 269 | None |
| 270 | } |
| 271 | |
| 272 | fn check_result(&self, cmd: &Self::Command, pre_state: &Self::State, result: Self::Result) { |
| 273 | if let CounterCommand::Get = cmd { |
Tested by
no test coverage detected