Skip to content

Commit d11ff2a

Browse files
committed
Impl io::error::repr_unpacked::Repr::new
that accepts `ErrorData<Box<Custom>>` Signed-off-by: Jiahao XU <[email protected]>
1 parent 89a0783 commit d11ff2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/std/src/io/error/repr_unpacked.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ type Inner = ErrorData<Box<Custom>>;
1010
pub(super) struct Repr(Inner);
1111

1212
impl Repr {
13+
#[inline]
14+
pub(super) fn new(dat: ErrorData<Box<Custom>>) -> Self {
15+
Self(dat)
16+
}
1317
pub(super) fn new_custom(b: Box<Custom>) -> Self {
1418
Self(Inner::Custom(b))
1519
}

0 commit comments

Comments
 (0)