From 4da1963c8ba6e0098ebcb489d34d538d13d309b7 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 10 Mar 2017 10:56:08 -0500 Subject: [PATCH] rename `priority` to `logical` --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3e57a281fd..bc2f12228d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -155,12 +155,12 @@ unsafe impl Sync for Resource {} /// 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 }