use crate::error::Error;
use std::fmt::Display;
pub type Result<T> = std::result::Result<T, Error>;
pub(crate) struct DisplayOption<T>(pub(crate) Option<T>);
impl<T: Display> Display for DisplayOption<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if let Some(ref val) = self.0 {
write!(f, "{val}")
} else {
write!(f, "")
}
}
}