File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 2
2
use crate :: * ;
3
3
4
4
/// TODO: RENAME THIS INTO THE NEXT VERSION BEFORE RELEASE
5
+ ///
6
+ /// ## Added
7
+ /// - Implement [`openssh_sftp_client::Writer`] for `ChildStdin`
8
+ /// if feature `openssh-sftp-client` is enabled.
5
9
#[ doc( hidden) ]
6
10
pub mod unreleased { }
7
11
Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ impl_try_from_tokio_process_child_for_stdio!(ChildStderr);
128
128
#[ derive( Debug ) ]
129
129
pub struct ChildStdin ( tokio_pipe:: PipeWrite ) ;
130
130
131
+ #[ cfg( feature = "openssh-sftp-client" ) ]
132
+ impl openssh_sftp_client:: Writer for ChildStdin {
133
+ const MAX_ATOMIC_WRITE_LEN : usize =
134
+ <tokio_pipe:: PipeWrite as openssh_sftp_client:: Writer >:: MAX_ATOMIC_WRITE_LEN ;
135
+
136
+ fn poll_write_vectored_atomic (
137
+ & self ,
138
+ cx : & mut Context < ' _ > ,
139
+ bufs : & [ io:: IoSlice < ' _ > ] ,
140
+ ) -> Poll < io:: Result < ( ) > > {
141
+ self . 0 . poll_write_vectored_atomic ( cx, bufs)
142
+ }
143
+ }
144
+
131
145
/// Stdout for the remote child.
132
146
#[ derive( Debug ) ]
133
147
pub struct ChildStdout ( tokio_pipe:: PipeRead ) ;
You can’t perform that action at this time.
0 commit comments