use crate::builtins::Builtin; use crate::error::ShellError; pub struct Exit; impl Builtin for Exit { fn execute(&mut self, _: Vec) -> Result<(), ShellError> { Err(ShellError::Exit) } } #[cfg(test)] mod tests { use super::*; #[test] fn test_exit() { assert_eq!(Exit.execute(vec!["arg".to_string()]), Err(ShellError::Exit)) } }