sbstp / rust-igd

Internet Gateway Device (UPNP) client
https://docs.rs/igd/
MIT License
105 stars 41 forks source link

updated to recent tokio #37

Closed ryankurte closed 5 years ago

ryankurte commented 5 years ago

the PR updates tokio to 0.1.18 and hyper to 0.12.28, removing explicit Handles and altering calls as required, and refactors the Search module to handle multiple responses.

sbstp commented 5 years ago

Oops sorry. I've been busy and I forgot about this.

sbstp commented 5 years ago

Thanks a lot. I'm going to make the changes we discussed tomorrow and then release 0.9.

sbstp commented 5 years ago

It's out.

ryankurte commented 5 years ago

neat, thanks!

ryankurte commented 5 years ago

i like how you've lifted SearchOptions, i wonder if it'd make sense to do the same with a RegisterOptions object and compress the register methods too.

as an aside, the Box<Future<_>> calls can also be replaced with impl Future as of 1.26.

sbstp commented 5 years ago

Do you mean the add_port and add_any_port methods on gateway? For now I'm happy with how they're setup.

The impl Future change would be nice, but for now it doesn't help our cause much since the returned type must be the same in conditional cases, so we'd have to keep the boxing anyway. It would just be syntaxic sugar.

ryankurte commented 5 years ago

fair enough, and yeah, you can swap Box for Either to deal with that, but, it's also a bit moot really