Documentation
use super::{super::problem::*, common::*};

//
// IntoCommonProblem
//

/// Into a common [Problem].
pub trait IntoCommonProblem {
    /// Into a [GlossError] problem.
    fn gloss(self) -> Problem;

    /// Into a [ThreadError] problem.
    fn into_thread_problem(self) -> Problem;
}

impl<ToStringT> IntoCommonProblem for ToStringT
where
    ToStringT: ToString,
{
    #[track_caller]
    fn gloss(self) -> Problem {
        GlossError::as_problem(self)
    }

    #[track_caller]
    fn into_thread_problem(self) -> Problem {
        ThreadError::as_problem(self)
    }
}