Impl io::error::repr_unpacked::Repr::new

that accepts `ErrorData<Box<Custom>>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU
2022-06-22 22:01:21 +10:00
parent 89a0783f1c
commit d11ff2a06e
@@ -10,6 +10,10 @@
pub(super) struct Repr(Inner);
impl Repr {
#[inline]
pub(super) fn new(dat: ErrorData<Box<Custom>>) -> Self {
Self(dat)
}
pub(super) fn new_custom(b: Box<Custom>) -> Self {
Self(Inner::Custom(b))
}