summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-11-19 11:59:29 -0600
committerToby Vincent <tobyv13@gmail.com>2022-11-19 11:59:29 -0600
commitbccb0acdb62080830492f010d2a5aa32a566da9d (patch)
treedebace8f75e3d5adbab54a9b055ab857d94a6ba2 /src
parent66256e222ac5dba71fec159e2a31ebd4a002caa1 (diff)
fix: fix Provider trait impl on config and cli structs
Diffstat (limited to 'src')
-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()
}
}