Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Schniz/fnm.rs. An experimental Rust implementation of fnm github.com/Schniz/fnm
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829use super::expression::Expression;use super::shell::Shell;use std::fmt::Write;
#[derive(Debug)]pub(crate) struct Call { binary: Box<&'static str>, args: Vec<&'static str>,}
impl Call { pub(crate) fn new(binary: &'static str, args: Vec<&'static str>) -> Self { Self { binary: Box::from(binary), args, } }}
impl<S: Shell> Expression<S> for Call { fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { write!(writer, "{}", self.binary)?; for arg in &self.args { write!(writer, " {}", arg)?; } Ok(()) }}