Starting code update

This commit is contained in:
Gregor Reitzenstein 2020-09-07 17:23:42 +02:00
parent 5a94720c2b
commit dad99eb5dc
6 changed files with 576 additions and 491 deletions

1052
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,7 @@ futures = { version = "0.3", features = ["thread-pool", "compat"] }
futures-util = "0.3" futures-util = "0.3"
futures-signals = "0.3" futures-signals = "0.3"
async-std = "1.5" smol = "0.4"
smol = "0.1"
signal-hook = { version = "0.1", features = ["tokio-support"] } signal-hook = { version = "0.1", features = ["tokio-support"] }

View File

@ -4,7 +4,7 @@ pub mod gen {
include!(concat!(env!("OUT_DIR"), "/schema/api_capnp.rs")); include!(concat!(env!("OUT_DIR"), "/schema/api_capnp.rs"));
} }
use async_std::net::TcpStream; use smol::net::TcpStream;
use futures_util::FutureExt; use futures_util::FutureExt;
use slog::Logger; use slog::Logger;

View File

@ -1,6 +1,6 @@
use slog::Logger; use slog::Logger;
use async_std::net::TcpStream; use smol::net::TcpStream;
use crate::error::Result; use crate::error::Result;
use crate::auth; use crate::auth;

View File

@ -10,7 +10,7 @@ use toml;
use crate::error::Result; use crate::error::Result;
use crate::config::Config; use crate::config::Config;
use async_std::sync::{Arc, RwLock}; use smol::lock::{Arc, RwLock};
use capnp::Error; use capnp::Error;
@ -86,10 +86,10 @@ impl MachinesProvider {
#[derive(Clone)] #[derive(Clone)]
pub struct Machines { pub struct Machines {
inner: Arc<RwLock<MachinesProvider>>, inner: RwLock<MachinesProvider>,
} }
impl Machines { impl Machines {
pub fn new(inner: Arc<RwLock<MachinesProvider>>) -> Self { pub fn new(inner: RwLock<MachinesProvider>) -> Self {
Self { inner } Self { inner }
} }
} }

View File

@ -24,8 +24,6 @@ use futures::compat::Stream01CompatExt;
use futures::join; use futures::join;
use futures::task::LocalSpawn; use futures::task::LocalSpawn;
use async_std::net::TcpListener;
use std::io; use std::io;
use std::io::Write; use std::io::Write;
use std::path::PathBuf; use std::path::PathBuf;