Switch RPCs to stable futures (#3287)

This commit is contained in:
Pierre Krieger
2019-08-02 19:52:55 +02:00
committed by Gavin Wood
parent aa86185648
commit c792dd358d
5 changed files with 18 additions and 12 deletions
+3 -2
View File
@@ -14,11 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use futures::{prelude::*, sync::oneshot};
use futures::prelude::*;
use futures03::{channel::oneshot, compat::Compat};
/// Wraps around `oneshot::Receiver` and adjusts the error type to produce an internal error if the
/// sender gets dropped.
pub struct Receiver<T>(pub oneshot::Receiver<T>);
pub struct Receiver<T>(pub Compat<oneshot::Receiver<T>>);
impl<T> Future for Receiver<T> {
type Item = T;