1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::any::{Demand, Provider};

pub trait ThiserrorProvide: Sealed {
    fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>);
}

impl<T: Provider + ?Sized> ThiserrorProvide for T {
    #[inline]
    fn thiserror_provide<'a>(&'a self, demand: &mut Demand<'a>) {
        self.provide(demand);
    }
}

pub trait Sealed {}
impl<T: Provider + ?Sized> Sealed for T {}