Split Server::listen into two methods to hack around ICE related to default type params

Trying to default the type parameters leads to an ICE and strange type errors.
I think this is just due to the experimental state of default type params and
this change can be rolled back when they are fixed.
This commit is contained in:
Jonathan Reem
2014-09-10 12:13:18 -07:00
parent 0c674a1376
commit cfd5cf3c68
4 changed files with 20 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ trait ConcurrentHandler: Send + Sync {
struct Concurrent<H: ConcurrentHandler> { handler: Arc<H> }
impl<H: ConcurrentHandler> Handler<HttpAcceptor, HttpStream> for Concurrent<H> {
fn handle(self, mut incoming: Incoming<HttpAcceptor>) {
fn handle(self, mut incoming: Incoming) {
for (mut req, mut res) in incoming {
let clone = self.handler.clone();
spawn(proc() { clone.handle(req, res) })