diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2017-03-10 10:56:08 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2017-03-10 10:56:08 -0500 |
| commit | 4da1963c8ba6e0098ebcb489d34d538d13d309b7 (patch) | |
| tree | f3972f4bf7f522cadcea80966a6ea3d62ce481d2 /src | |
| parent | 288b01ea07998c7a2f10db350ab74964e5c26ba9 (diff) | |
rename `priority` to `logical`
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -155,12 +155,12 @@ unsafe impl<T, Ceiling> Sync for Resource<T, Ceiling> {} /// priorities like `1` and `2` aren't actually different) /// /// NOTE `logical` must be in the range `[1, 15]` (inclusive) -pub const fn priority(logical: u8) -> u8 { +pub const fn logical(priority: u8) -> u8 { // NOTE elements 1 and 2 of the tuple are a poor man's const context range // checker - (((1 << PRIORITY_BITS) - logical) << (8 - PRIORITY_BITS), - logical - 1, - logical + 240) + (((1 << PRIORITY_BITS) - priority) << (8 - PRIORITY_BITS), + priority - 1, + priority + 240) .0 } |
