command : déplacement du trait Command

This commit is contained in:
Ahurac 2024-04-10 10:03:57 +02:00
parent f48a79df4e
commit ea9eb49697

View file

@ -4,10 +4,6 @@ pub struct ExitCode {
exit_code: u8, exit_code: u8,
} }
pub trait Command {
fn spawn(&self) -> ExitCode;
}
impl ExitCode { impl ExitCode {
pub fn new(exit_code: u8) -> Self { pub fn new(exit_code: u8) -> Self {
Self { exit_code } Self { exit_code }
@ -18,6 +14,10 @@ impl ExitCode {
} }
} }
pub trait Command {
fn spawn(&self) -> ExitCode;
}
pub struct UnixProgram { pub struct UnixProgram {
argv: Vec<String>, argv: Vec<String>,
} }