Переглянути джерело

bin/darkfid: added drk::Result

lunar-mining 4 роки тому
батько
коміт
b02ed32d1d
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      src/bin/darkfid.rs

+ 3 - 3
src/bin/darkfid.rs

@@ -22,7 +22,7 @@ use drk::{
     serial::serialize,
     serial::serialize,
     util::join_config_path,
     util::join_config_path,
     wallet::WalletDb,
     wallet::WalletDb,
-    Error,
+    Error, Result,
 };
 };
 
 
 #[derive(Clone)]
 #[derive(Clone)]
@@ -37,7 +37,7 @@ struct Darkfid {
 }
 }
 
 
 impl Darkfid {
 impl Darkfid {
-    fn new(verbose: bool, config_path: PathBuf) -> Result<Self, Error> {
+    fn new(verbose: bool, config_path: PathBuf) -> Result<Self> {
         let config: DarkfidConfig = Config::<DarkfidConfig>::load(config_path)?;
         let config: DarkfidConfig = Config::<DarkfidConfig>::load(config_path)?;
         let wallet_path = join_config_path(&PathBuf::from("walletdb.db"))?;
         let wallet_path = join_config_path(&PathBuf::from("walletdb.db"))?;
         let wallet = WalletDb::new(&PathBuf::from(wallet_path.clone()), config.password.clone())?;
         let wallet = WalletDb::new(&PathBuf::from(wallet_path.clone()), config.password.clone())?;
@@ -289,7 +289,7 @@ impl Darkfid {
 }
 }
 
 
 #[tokio::main]
 #[tokio::main]
-async fn main() -> Result<(), Box<dyn std::error::Error>> {
+async fn main() -> Result<()> {
     let args = clap_app!(darkfid =>
     let args = clap_app!(darkfid =>
         (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
         (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
         (@arg verbose: -v --verbose "Increase verbosity")
         (@arg verbose: -v --verbose "Increase verbosity")