mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-09 23:27:27 +00:00
Switch RPCs to stable futures (#3287)
This commit is contained in:
committed by
Gavin Wood
parent
aa86185648
commit
c792dd358d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user