File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ impl Write for &mut [u8] {
25
25
Ok ( amt)
26
26
}
27
27
28
+ #[ inline]
29
+ async fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
30
+ Ok ( ( ) )
31
+ }
32
+
28
33
#[ inline]
29
34
async fn write_all ( & mut self , buf : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
30
35
if self . len ( ) < buf. len ( ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ impl Write for Vec<u8> {
10
10
Ok ( buf. len ( ) )
11
11
}
12
12
13
+ #[ inline]
14
+ async fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
15
+ Ok ( ( ) )
16
+ }
17
+
13
18
#[ inline]
14
19
async fn write_all ( & mut self , buf : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
15
20
self . write ( buf) . await ?;
Original file line number Diff line number Diff line change @@ -127,9 +127,7 @@ pub trait Write: ErrorType {
127
127
async fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > ;
128
128
129
129
/// Flush this output stream, ensuring that all intermediately buffered contents reach their destination.
130
- async fn flush ( & mut self ) -> Result < ( ) , Self :: Error > {
131
- Ok ( ( ) )
132
- }
130
+ async fn flush ( & mut self ) -> Result < ( ) , Self :: Error > ;
133
131
134
132
/// Write an entire buffer into this writer.
135
133
///
You can’t perform that action at this time.
0 commit comments