Просмотр исходного кода

Merge branch 'master' of github.com:darkrenaissance/darkfi

ghassmo 4 лет назад
Родитель
Сommit
8ef79fe380
2 измененных файлов с 5 добавлено и 3 удалено
  1. 1 1
      src/bin/drk.rs
  2. 4 2
      src/rpc/jsonrpc.rs

+ 1 - 1
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")

+ 4 - 2
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;