Currently the Allocate::allocate method is hardcoded to return a (Vec<Box<dyn Push<Message<T>>>>, Box<dyn Pull<Message<T>>>) pair. Boxing was necessary because the generic T parameter was on the method.
Generic associated types is the missing piece to allow the concrete type to be spelled out and since they are right around the corner for stable Rust I went ahead and implemented it.
This PR removes every single use of a Box<dyn Puller/Pusher> instance in the codebase. It is not mergeable yet because it requires the nightly feature flag but we could discuss it and merge it once GATs are released.
Currently the
Allocate::allocate
method is hardcoded to return a(Vec<Box<dyn Push<Message<T>>>>, Box<dyn Pull<Message<T>>>)
pair. Boxing was necessary because the genericT
parameter was on the method.Generic associated types is the missing piece to allow the concrete type to be spelled out and since they are right around the corner for stable Rust I went ahead and implemented it.
This PR removes every single use of a
Box<dyn Puller/Pusher>
instance in the codebase. It is not mergeable yet because it requires the nightly feature flag but we could discuss it and merge it once GATs are released.