paritytech / parity-tokio-ipc

Parity tokio-ipc
Apache License 2.0
76 stars 48 forks source link

Make Endpoint::incoming consistently consume self on Unix #31

Closed Xanewok closed 3 years ago

Xanewok commented 3 years ago

Spotted when trying to migrate jsonrpc to futures 0.3 (WIP @ https://github.com/paritytech/jsonrpc/commit/51c2feeaebcf26ca421f59658dd79cc23a2a14ae). Ideally, we should consume self in both Windows and Unix cases - having one method borrow &self leads to lifetime issues and a grumpy compiler. Instead, I opted to consume self similarly to what previous implementation (futures 0.1) did and what is currently implemented for Windows.

cc @seunlanlege for the current impl