use super::super::problem::*;
use std::{error::*, fmt};
pub struct ProblemAsError {
pub problem: Problem,
}
impl fmt::Debug for ProblemAsError {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&self.problem, formatter)
}
}
impl fmt::Display for ProblemAsError {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&self.problem, formatter)
}
}
impl Error for ProblemAsError {}
impl From<Problem> for ProblemAsError {
fn from(problem: Problem) -> Self {
Self { problem }
}
}