Skip to content
Snippets Groups Projects

Refactor commands in handle_command for less redundancy in error handling

Merged DISSOUBRAY Nathan requested to merge handle_command_error_refactor into master

Description

There were a lot of repetitions involving sending back the result of commands and checking that the result was properly received. By changing the different parts of the match statement in handle_command to use functions returning results instead, we can reduce the redundancy.

Note

Not all match statements have been refactored, because it either doesn't make sense (no redundancy in the given match), or there it is not possible as is due to having to use the sender for the operation as well as the error handling (and we have problems with move of value).

Merge request reports

Merge request pipeline #5078 passed

Merge request pipeline passed for 9ad3921d

Merged by DISSOUBRAY NathanDISSOUBRAY Nathan 1 year ago (May 14, 2024 2:17pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading