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:
parent
89a0783f1c
commit
d11ff2a06e
1 changed files with 4 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ type Inner = ErrorData<Box<Custom>>;
|
|||
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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue