Misc changes (#2)

* Remove dependency on tokio, submit returns a future
* Enable logging in tests
* Add fetch, fetch_or, fetch_or_default
This commit is contained in:
David Craven
2019-08-06 16:26:11 +02:00
committed by Andrew Jones
parent 5a046d043e
commit 6522bb08d0
4 changed files with 132 additions and 41 deletions
+7 -9
View File
@@ -20,16 +20,14 @@ use substrate_primitives::crypto::SecretStringError;
#[derive(Debug, derive_more::From)]
pub enum Error {
Io(IoError),
Rpc(RpcError),
SecretString(SecretStringError),
Other(String),
Io(IoError),
Rpc(RpcError),
SecretString(SecretStringError),
Other(String),
}
impl From<&str> for Error {
fn from(error: &str) -> Self {
Error::Other(error.into())
}
fn from(error: &str) -> Self {
Error::Other(error.into())
}
}
pub type Result<T> = std::result::Result<T, Error>;