summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorMarcel Müller <m.mueller@ifm.com>2022-04-13 09:04:47 +0200
committerMarcel Müller <m.mueller@ifm.com>2022-04-13 09:04:47 +0200
commit1520661de959b4a547a7fdc7810fe09793fbef8d (patch)
tree523adf4bc4d988cae469d4437a4d869b24f9452a /crates
parentcb733386ec05deb5a6ba35c433942472f9d720c1 (diff)
Remove spanned wrapper for toml config in plugins
While having spanning information is very important for good error messages, the current system is not very well suited for it anyway. This patch removes the spanned wrapper to simplify current implementations, with an outlook to a better replacement. Signed-off-by: Marcel Müller <m.mueller@ifm.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/core/tedge_api/examples/heartbeat.rs2
-rw-r--r--crates/core/tedge_api/src/plugin.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/core/tedge_api/examples/heartbeat.rs b/crates/core/tedge_api/examples/heartbeat.rs
index 7fae395e..cb05b4b1 100644
--- a/crates/core/tedge_api/examples/heartbeat.rs
+++ b/crates/core/tedge_api/examples/heartbeat.rs
@@ -64,7 +64,7 @@ impl<PD: PluginDirectory> PluginBuilder<PD> for HeartbeatServiceBuilder {
where
PD: 'async_trait,
{
- let hb_config: HeartbeatConfig = toml::Value::try_into(config.into_inner())?;
+ let hb_config: HeartbeatConfig = toml::Value::try_into(config)?;
let monitored_services = hb_config
.plugins
.iter()
diff --git a/crates/core/tedge_api/src/plugin.rs b/crates/core/tedge_api/src/plugin.rs
index 958c7cce..8d24fc38 100644
--- a/crates/core/tedge_api/src/plugin.rs
+++ b/crates/core/tedge_api/src/plugin.rs
@@ -56,7 +56,7 @@ pub trait PluginDirectory: Send + Sync {
/// It is important that configuration errors are communicated precisely
/// and concisely. Reporting the span is not a must, but greatly helps users
/// in diagnostics of errors as well as sources of configuration.
-pub type PluginConfiguration = toml::Spanned<toml::value::Value>;
+pub type PluginConfiguration = toml::value::Value;
/// A plugin builder for a given plugin
///