mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-01 21:14:43 -05:00
Import anyhow::Result across the codebase
There is no need to fully qualify this type because it is a type alias for std::Result. We can mix and match the two as we want.
This commit is contained in:
parent
519d1a5701
commit
b47b06aa23
11 changed files with 21 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use anyhow::Context;
|
||||
use anyhow::{Context, Result};
|
||||
use directories_next::ProjectDirs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ fn default_config_dir() -> Option<PathBuf> {
|
|||
ProjectDirs::from("", "", "xmr-btc-swap").map(|proj_dirs| proj_dirs.config_dir().to_path_buf())
|
||||
}
|
||||
|
||||
pub fn default_config_path() -> anyhow::Result<PathBuf> {
|
||||
pub fn default_config_path() -> Result<PathBuf> {
|
||||
default_config_dir()
|
||||
.map(|dir| Path::join(&dir, "config.toml"))
|
||||
.context("Could not generate default configuration path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue