refactor: use color-eyre instead of jane-eyre. to be responsible.

buddies-main-deployment
James Prestwich 4 years ago
parent 740c6321a6
commit ba46a337f4
No known key found for this signature in database
GPG Key ID: 75A7F5C06D747046
  1. 11
      rust/Cargo.lock
  2. 2
      rust/optics-base/Cargo.toml
  3. 2
      rust/optics-base/config/default.toml
  4. 18
      rust/optics-base/src/main.rs
  5. 2
      rust/optics-base/src/settings/ethereum.rs
  6. 2
      rust/optics-base/src/settings/mod.rs

11
rust/Cargo.lock generated

@ -971,15 +971,6 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
name = "jane-eyre"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccd957c837e264dcbc6e75b58fcf85fd329a66e4836f820779c40563a2d0be0"
dependencies = [
"color-eyre",
]
[[package]]
name = "js-sys"
version = "0.3.46"
@ -1232,6 +1223,7 @@ name = "optics-base"
version = "0.1.0"
dependencies = [
"async-trait",
"color-eyre",
"config",
"ethers",
"ethers-contract",
@ -1239,7 +1231,6 @@ dependencies = [
"ethers-middleware",
"ethers-providers",
"ethers-signers",
"jane-eyre",
"optics-core",
"serde 1.0.120",
"serde_json",

@ -24,4 +24,4 @@ thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
url = { version = "2.2.0", default-features = false }
jane-eyre = "0.3.0"
color-eyre = "0.5.0"

@ -19,4 +19,4 @@ rpc-style = "Ethereum"
address = "0x0000000000000000000000000000000000000000"
rpc-style = "Ethereum"
[replicas.EthClassic.config]
connection = { type = "Ws", url = "ws://localhost:8545"}
connection = { type = "Ws", url = ""}

@ -19,7 +19,7 @@ pub mod settings;
use optics_core::traits::{Home, Replica};
use jane_eyre::{eyre::WrapErr, Result};
use color_eyre::{eyre::WrapErr, Result};
use std::collections::HashMap;
/// The global app context.
@ -59,20 +59,24 @@ impl ChainConnections {
}
}
async fn _main(settings: settings::Settings) {
println!("{:?}", &settings);
let app = ChainConnections::try_from_settings(&settings).await;
async fn _main(settings: settings::Settings) -> Result<()> {
let app = ChainConnections::try_from_settings(&settings).await?;
println!("\n{:#?}", &app);
Ok(())
}
fn main() {
fn main() -> Result<()> {
color_eyre::install()?;
let settings = settings::Settings::new().expect("!config");
tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap()
.block_on(_main(settings))
.block_on(_main(settings))?;
Ok(())
}

@ -1,7 +1,7 @@
use std::convert::TryFrom;
use color_eyre::Report;
use ethers_core::types::Address;
use jane_eyre::Report;
use optics_core::traits::{Home, Replica};

@ -1,5 +1,5 @@
use color_eyre::Report;
use config::{Config, ConfigError, Environment, File};
use jane_eyre::Report;
use std::{collections::HashMap, env};
use optics_core::traits::{Home, Replica};

Loading…
Cancel
Save