summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Batischev <eual.jp@gmail.com>2021-07-21 21:59:13 +0300
committerAlexander Batischev <eual.jp@gmail.com>2021-07-21 22:25:50 +0300
commitb8a242aeb81ec5c0a1d41c7566ec9ec9eea2a020 (patch)
treea340cf8986e37134f409477291a08b0c43d11e4a /src
parente0e31072688586cb4d78637e2ef0f21f3914ed19 (diff)
downloadobnam2-b8a242aeb81ec5c0a1d41c7566ec9ec9eea2a020.tar.gz
Replace ClientConfigResult with plain Result
Diffstat (limited to 'src')
-rw-r--r--src/config.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index 0d4e9de..8f5d4d8 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -31,7 +31,7 @@ pub struct ClientConfig {
}
impl ClientConfig {
- pub fn read(filename: &Path) -> ClientConfigResult<Self> {
+ pub fn read(filename: &Path) -> Result<Self, ClientConfigError> {
trace!("read_config: filename={:?}", filename);
let config = std::fs::read_to_string(filename)
.map_err(|err| ClientConfigError::Read(filename.to_path_buf(), err))?;
@@ -102,8 +102,6 @@ pub enum ClientConfigError {
YamlParse(PathBuf, serde_yaml::Error),
}
-pub type ClientConfigResult<T> = Result<T, ClientConfigError>;
-
fn expand_tilde(path: &Path) -> PathBuf {
if path.starts_with("~/") {
if let Some(home) = std::env::var_os("HOME") {