Switch to using CustomError because a boxed StdError is not Send.

This commit is contained in:
Tom Alexander
2023-10-22 13:44:03 -04:00
parent d8fc49797e
commit 2f0f3ab346
8 changed files with 95 additions and 61 deletions

View File

@@ -1,7 +1,8 @@
use crate::cli::parameters::InitArgs;
use crate::config::Config;
use crate::error::CustomError;
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), Box<dyn std::error::Error>> {
pub(crate) async fn init_writer_folder(args: InitArgs) -> Result<(), CustomError> {
if args.path.exists() && !args.path.is_dir() {
return Err("The supplied path exists but is not a directory. Aborting.".into());
}