#[must_use]
pub fn new(object: &str) -> Show<'_> {
Show::new(object)
}
#[derive(Debug)]
pub struct Show<'a> {
base: crate::RepoBase<'a>,
object: &'a str,
}
crate::impl_repo_base!(Show);
impl<'a> Show<'a> {
#[must_use]
fn new(object: &'a str) -> Self {
Self {
base: crate::RepoBase::default(),
object,
}
}
}
impl crate::Build for Show<'_> {
fn build(self) -> Result<cmd_proc::Command, crate::EnvError> {
Ok(self.base.command()?.argument("show").argument(self.object))
}
}
#[cfg(feature = "test-utils")]
impl Show<'_> {
pub fn test_eq(&self, other: &cmd_proc::Command) {
let command = crate::Build::build(Self {
base: self.base,
object: self.object,
})
.unwrap();
command.test_eq(other);
}
}