diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-20 08:51:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-20 08:51:53 +0000 |
| commit | 78f556f9427e94e830b6ff6269bb1ac80010c5e6 (patch) | |
| tree | 9db41cca23a87a9d78369c14b311d7fda9309fc0 /src/tq.rs | |
| parent | c67657371b9f27353caae8a8ccf6e94cd0f25110 (diff) | |
| parent | bf80035aef21dd9c84a26ed47bbd1bb4a596952f (diff) | |
Merge #464
464: const generics r=AfoHT a=burrbull
Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Co-authored-by: mriise <mark.riise26@gmail.com>
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
Diffstat (limited to 'src/tq.rs')
| -rw-r--r-- | src/tq.rs | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ use crate::{ - linked_list::{ArrayLength, LinkedList, Min, Node}, + linked_list::{LinkedList, Min}, time::{Clock, Instant}, Monotonic, }; @@ -14,16 +14,14 @@ fn unwrapper<T, E>(val: Result<T, E>) -> T { } } -pub struct TimerQueue<Mono, Task, N>(pub LinkedList<NotReady<Mono, Task>, Min, N>) +pub struct TimerQueue<Mono, Task, const N: usize>(pub LinkedList<NotReady<Mono, Task>, Min, N>) where Mono: Monotonic, - N: ArrayLength<Node<NotReady<Mono, Task>>>, Task: Copy; -impl<Mono, Task, N> TimerQueue<Mono, Task, N> +impl<Mono, Task, const N: usize> TimerQueue<Mono, Task, N> where Mono: Monotonic, - N: ArrayLength<Node<NotReady<Mono, Task>>>, Task: Copy, { pub fn new() -> Self { |
