diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-25 22:06:19 +0000 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-02-25 22:06:19 +0000 |
| commit | a9c6be4162bd15bd41ba3605127b56cb1eb32f32 (patch) | |
| tree | 6d97b0c6286b1eabb2ef5cab34b472f1622584e5 /src/command/status/mod.rs | |
| parent | 53812065cf124b6c1bc40fceec46f8c161033e29 (diff) | |
Add part of the implementation for add
Diffstat (limited to 'src/command/status/mod.rs')
| -rw-r--r-- | src/command/status/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/command/status/mod.rs b/src/command/status/mod.rs index ba73184..e8754f5 100644 --- a/src/command/status/mod.rs +++ b/src/command/status/mod.rs @@ -1,6 +1,7 @@ mod configuration_status; use std::io::Result; +use crate::configuration::Configuration; pub struct Status; @@ -15,10 +16,10 @@ impl super::Command for Status { vec![] } - fn execute(&self, _: Option<&String>) -> Result<()> { + fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> { let status_providers = available_status_providers(); for status_provider in status_providers { - println!("{}", status_provider()); + println!("{}", status_provider(configuration)); } return Ok(()) } @@ -36,7 +37,7 @@ impl super::Command for Status { } } -fn available_status_providers() -> Vec<fn() -> String> { +fn available_status_providers() -> Vec<fn(&Configuration) -> String> { vec![ configuration_status::status, ] |