1use std::fmt::Display; 2 3/// Simple error type, just carries a String to be printed 4#[derive(Debug)] 5pub struct Error(pub String); 6 7impl Display for Error { 8 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 9 write!(f, "{}", self.0) 10 } 11}