diff options
| -rw-r--r-- | crates/shirabe/src/command/depends_command.rs | 21 | ||||
| -rw-r--r-- | crates/shirabe/src/command/prohibits_command.rs | 10 |
2 files changed, 22 insertions, 9 deletions
diff --git a/crates/shirabe/src/command/depends_command.rs b/crates/shirabe/src/command/depends_command.rs index 1e702e3..78b3dbb 100644 --- a/crates/shirabe/src/command/depends_command.rs +++ b/crates/shirabe/src/command/depends_command.rs @@ -65,11 +65,22 @@ impl DependsCommand { ); } - pub fn execute(&mut self, input: &dyn InputInterface, output: &dyn OutputInterface) -> i64 { - // TODO(phase-b): wire `do_execute` from BaseDependencyCommand trait without conflicting with - // BaseCommand blanket impl - let _ = (input, output); - todo!() + pub fn execute( + &mut self, + input: &dyn InputInterface, + output: &dyn OutputInterface, + ) -> anyhow::Result<i64> { + self.do_execute(input, output, false) + } +} + +impl BaseDependencyCommand for DependsCommand { + fn colors(&self) -> &[String] { + &self.colors + } + + fn colors_mut(&mut self) -> &mut Vec<String> { + &mut self.colors } } diff --git a/crates/shirabe/src/command/prohibits_command.rs b/crates/shirabe/src/command/prohibits_command.rs index 9b8132b..ff9328c 100644 --- a/crates/shirabe/src/command/prohibits_command.rs +++ b/crates/shirabe/src/command/prohibits_command.rs @@ -73,10 +73,12 @@ impl ProhibitsCommand { ); } - pub fn execute(&mut self, input: &dyn InputInterface, output: &dyn OutputInterface) -> i64 { - // TODO(phase-b): wire `do_execute` from BaseDependencyCommand trait - let _ = (input, output); - todo!() + pub fn execute( + &mut self, + input: &dyn InputInterface, + output: &dyn OutputInterface, + ) -> anyhow::Result<i64> { + self.do_execute(input, output, true) } } |
