errors.rs 301 B

123456789101112
  1. use std::{error::Error, fmt};
  2. #[derive(Clone, Debug)]
  3. pub struct OTError;
  4. impl fmt::Display for OTError {
  5. fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "incompatible lengths") }
  6. }
  7. impl Error for OTError {
  8. fn source(&self) -> Option<&(dyn Error + 'static)> { None }
  9. }