refactor: separate responsibilties
Before, priority carried two pieces of information.
One: priority as defined by remote peer
Two: whether task is trashed
This assumes the protocol is defined for natural numbers instead of
integers. That may not always be the case. Better to leave that
assumption outside so this package isn't coupled to the whims of the
protocol.
The protocol may be changed to allow any integer value to be used.
Hopefully by that time, new responsibilties weren't added to the
Priority variable.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Showing
Please register or sign in to comment