claude_wrapper/command/
doctor.rs1#[cfg(feature = "async")]
8use crate::Claude;
9use crate::command::ClaudeCommand;
10#[cfg(feature = "async")]
11use crate::error::Result;
12#[cfg(feature = "async")]
13use crate::exec;
14use crate::exec::CommandOutput;
15
16#[derive(Debug, Clone, Default)]
31pub struct DoctorCommand {}
32
33impl DoctorCommand {
34 #[must_use]
36 pub fn new() -> Self {
37 Self::default()
38 }
39}
40
41impl ClaudeCommand for DoctorCommand {
42 type Output = CommandOutput;
43
44 fn args(&self) -> Vec<String> {
45 vec!["doctor".to_string()]
46 }
47
48 #[cfg(feature = "async")]
49 async fn execute(&self, claude: &Claude) -> Result<CommandOutput> {
50 exec::run_claude(claude, self.args()).await
51 }
52}
53
54#[cfg(test)]
55mod tests {
56 use super::*;
57
58 #[test]
59 fn test_doctor_args() {
60 let cmd = DoctorCommand::new();
61 assert_eq!(cmd.args(), vec!["doctor"]);
62 }
63}