File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -112,22 +112,19 @@ macro_rules! impl_buffered_source {
112112 }
113113 } ;
114114
115- match parser. feed( available) {
116- Some ( i) => {
117- buf. extend_from_slice( & available[ ..i] ) ;
115+ if let Some ( i) = parser. feed( available) {
116+ buf. extend_from_slice( & available[ ..i] ) ;
118117
119- // +1 for `>` which we do not include
120- self $( . $reader) ? . consume( i + 1 ) ;
121- read += i + 1 ;
118+ // +1 for `>` which we do not include
119+ self $( . $reader) ? . consume( i + 1 ) ;
120+ read += i + 1 ;
122121
123- * position += read;
124- return Ok ( & buf[ start..] ) ;
125- }
126- None => {
127- buf. extend_from_slice( available) ;
128- available. len( )
129- }
122+ * position += read;
123+ return Ok ( & buf[ start..] ) ;
130124 }
125+
126+ buf. extend_from_slice( available) ;
127+ available. len( )
131128 } ;
132129 self $( . $reader) ? . consume( used) ;
133130 read += used;
You can’t perform that action at this time.
0 commit comments