From dedef113dd774abab7413b8246d052deaeedd4ec Mon Sep 17 00:00:00 2001 From: parazyd Date: Thu, 23 Sep 2021 11:59:49 +0200 Subject: [PATCH 1/2] bin/drk: tokio -> async_std. --- src/bin/drk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/drk.rs b/src/bin/drk.rs index dd1f07e50..0db95f6e1 100644 --- a/src/bin/drk.rs +++ b/src/bin/drk.rs @@ -214,7 +214,7 @@ async fn start(config: &DrkConfig, options: ArgMatches<'_>) -> Result<()> { Err(Error::MissingParams) } -#[tokio::main] +#[async_std::main] async fn main() -> Result<()> { let args = clap_app!(drk => (@arg CONFIG: -c --config +takes_value "Sets a custom config file") From f4f43fa0f77705f96bd9e4586364a0ded8a25b49 Mon Sep 17 00:00:00 2001 From: parazyd Date: Thu, 23 Sep 2021 12:02:02 +0200 Subject: [PATCH 2/2] rpc/jsonrpc: tokio -> async_std. --- src/rpc/jsonrpc.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rpc/jsonrpc.rs b/src/rpc/jsonrpc.rs index 86758ad28..813e268ec 100644 --- a/src/rpc/jsonrpc.rs +++ b/src/rpc/jsonrpc.rs @@ -1,10 +1,12 @@ use std::str; +use async_std::{ + io::{ReadExt, WriteExt}, + net::TcpStream, +}; use rand::Rng; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; -use tokio::io::{AsyncReadExt, AsyncWriteExt}; -use tokio::net::TcpStream; use crate::Error;