File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -338,9 +338,15 @@ impl<S: From<(ChannelId, ChannelMsg)> + Send + Sync + 'static> ChannelWriteHalf<
338338 . map_err ( |_| Error :: SendError )
339339 }
340340
341+ /// Make a writer for the [`Channel`] to send [`ChannelMsg::Data`]
342+ /// through the `AsyncWrite` trait.
343+ pub fn make_writer ( & self ) -> impl AsyncWrite {
344+ self . make_writer_ext ( None )
345+ }
346+
341347 /// Make a writer for the [`Channel`] to send [`ChannelMsg::Data`] or [`ChannelMsg::ExtendedData`]
342348 /// depending on the `ext` parameter, through the `AsyncWrite` trait.
343- fn make_writer_ext ( & self , ext : Option < u32 > ) -> impl AsyncWrite {
349+ pub fn make_writer_ext ( & self , ext : Option < u32 > ) -> impl AsyncWrite {
344350 io:: ChannelTx :: new (
345351 self . sender . clone ( ) ,
346352 self . id ,
@@ -583,7 +589,7 @@ impl<S: From<(ChannelId, ChannelMsg)> + Send + Sync + 'static> Channel<S> {
583589 /// Make a writer for the [`Channel`] to send [`ChannelMsg::Data`]
584590 /// through the `AsyncWrite` trait.
585591 pub fn make_writer ( & self ) -> impl AsyncWrite {
586- self . make_writer_ext ( None )
592+ self . write_half . make_writer ( )
587593 }
588594
589595 /// Make a writer for the [`Channel`] to send [`ChannelMsg::Data`] or [`ChannelMsg::ExtendedData`]
You can’t perform that action at this time.
0 commit comments