summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cli.rs4
-rw-r--r--src/config.rs2
-rw-r--r--src/finder/config.rs2
-rw-r--r--src/logging/config.rs2
-rw-r--r--src/paths/config.rs2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/cli.rs b/src/cli.rs
index c9bd6b6..2fd296f 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,6 +1,6 @@
use crate::{paths::PathEntry, Config};
use clap::{Args, Parser};
-use figment::{providers::Serialized, value, Metadata, Profile, Provider};
+use figment::{value, Metadata, Profile, Provider};
use serde::Serialize;
use std::path::PathBuf;
use tracing::Level;
@@ -41,7 +41,7 @@ impl Provider for Cli {
}
fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Serialized::defaults(Self::default()).data()
+ Config::from(self.to_owned()).data()
}
}
diff --git a/src/config.rs b/src/config.rs
index afbb401..39c27fe 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -23,7 +23,7 @@ impl Provider for Config {
}
fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Serialized::defaults(Self::default()).data()
+ Serialized::defaults(self).data()
}
}
diff --git a/src/finder/config.rs b/src/finder/config.rs
index 916637f..47a7eb6 100644
--- a/src/finder/config.rs
+++ b/src/finder/config.rs
@@ -43,7 +43,7 @@ impl Provider for Config {
}
fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Serialized::defaults(Self::default()).data()
+ Serialized::defaults(self).data()
}
}
diff --git a/src/logging/config.rs b/src/logging/config.rs
index 8626a36..2f7be0f 100644
--- a/src/logging/config.rs
+++ b/src/logging/config.rs
@@ -31,7 +31,7 @@ impl Provider for Config {
}
fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Serialized::defaults(Self::default()).data()
+ Serialized::defaults(self).data()
}
}
diff --git a/src/paths/config.rs b/src/paths/config.rs
index eea176f..4756d02 100644
--- a/src/paths/config.rs
+++ b/src/paths/config.rs
@@ -25,7 +25,7 @@ impl Provider for Config {
}
fn data(&self) -> figment::error::Result<value::Map<Profile, value::Dict>> {
- Serialized::defaults(Self::default()).data()
+ Serialized::defaults(self).data()
}
}