From 0c4a0f87b80c5e61903c72e94be38f52179cbcef Mon Sep 17 00:00:00 2001
From: Eduardo Trujillo <ed@chromabits.com>
Date: Mon, 4 Apr 2022 18:08:46 -0700
Subject: [PATCH] feat(cargo): Update collective dependency

---
 .gitignore  |  3 ++-
 Cargo.lock  | 11 ++++++-----
 Cargo.toml  |  4 ++--
 src/main.rs | 13 ++++++-------
 4 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore
index db38427..62f863d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /target
-config.toml
\ No newline at end of file
+config.toml
+config.yaml
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index ee3acfc..0c80836 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -74,9 +74,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "clap"
-version = "3.1.6"
+version = "3.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123"
+checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
 dependencies = [
  "atty",
  "bitflags",
@@ -91,9 +91,9 @@ dependencies = [
 
 [[package]]
 name = "clap_derive"
-version = "3.1.4"
+version = "3.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
+checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
 dependencies = [
  "heck",
  "proc-macro-error",
@@ -105,10 +105,11 @@ dependencies = [
 [[package]]
 name = "collective"
 version = "0.1.2"
-source = "git+https://gitlab.chromabits.com/etcinit/collective.git?branch=master#34c0ca961ce28f181012dc57bf017d62e1fc2609"
+source = "git+https://gitlab.chromabits.com/etcinit/collective.git#29fcf5252b794afd51e066de2e79a6f7ae9fe805"
 dependencies = [
  "clap",
  "figment",
+ "lazy_static",
  "log",
  "pretty_env_logger",
  "serde",
diff --git a/Cargo.toml b/Cargo.toml
index 1322ac4..4c0a547 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,8 +19,8 @@ dbus-tokio = "0.7.4"
 tokio = {version = "1.0", features=["time", "net", "macros", "rt-multi-thread", "signal", "process", "io-std", "io-util"]}
 tokio-stream = "0.1"
 futures-channel = "0.3.17"
-collective = { git = "https://gitlab.chromabits.com/etcinit/collective.git", branch = "master" }
-clap = {version = "3.1", features=["derive"]}
+collective = { git = "https://gitlab.chromabits.com/etcinit/collective.git", reference = "29fcf5252b794afd51e066de2e79a6f7ae9fe805" }
+clap = { version = "3.1", features = ["derive"]}
 serde = "1.0.115"
 serde_derive = "1.0.115"
 num-derive = "0.3.3"
diff --git a/src/main.rs b/src/main.rs
index 43c13d2..6c0ae5c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,4 @@
-use collective::cli::{AppOpts, ConfigurableAppOpts};
-use collective::config::ConfigFileFormat;
+use collective::{cli::{AppOpts, ConfigurableAppOpts}, config::ConfigFileFormat};
 use dbus_tokio::connection;
 use std::{path::PathBuf, sync::Arc};
 use tokio::{
@@ -52,17 +51,17 @@ impl AppOpts for Opts {
 }
 
 impl ConfigurableAppOpts<config::Config> for Opts {
-    fn get_config_file_format(&self) -> ConfigFileFormat {
-        ConfigFileFormat::Yaml
-    }
-
-    fn get_additional_config_paths(&self) -> Vec<(PathBuf, std::option::Option<ConfigFileFormat>)> {
+    fn get_additional_config_paths(&self) -> Vec<(PathBuf, Option<ConfigFileFormat>)> {
         if let Some(config_path) = &self.config {
             vec![(config_path.clone(), None)]
         } else {
             vec![]
         }
     }
+
+    fn get_config_file_format(&self) -> ConfigFileFormat {
+        ConfigFileFormat::Yaml
+    }
 }
 
 async fn inner_main() -> anyhow::Result<()> {
-- 
GitLab