mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 15:56:09 +03:00
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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user