greentic-pack-dev 1.1.26495471727

Greentic pack builder CLI
Documentation
#![forbid(unsafe_code)]

use std::io::Write;

use anyhow::Result;

pub fn render_text<W: Write>(output: &mut W, text: &str) -> Result<()> {
    write!(output, "{text}")?;
    Ok(())
}

pub fn render_line<W: Write>(output: &mut W, text: &str) -> Result<()> {
    writeln!(output, "{text}")?;
    Ok(())
}

pub fn render_prompt<W: Write>(output: &mut W, prompt: &str) -> Result<()> {
    write!(output, "{prompt}")?;
    output.flush()?;
    Ok(())
}