File tree Expand file tree Collapse file tree
postgres-protocol/src/message Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,14 +285,17 @@ struct Buffer {
285285}
286286
287287impl Buffer {
288+ #[ inline]
288289 fn slice ( & self ) -> & [ u8 ] {
289290 & self . bytes [ self . idx ..]
290291 }
291292
293+ #[ inline]
292294 fn is_empty ( & self ) -> bool {
293295 self . slice ( ) . is_empty ( )
294296 }
295297
298+ #[ inline]
296299 fn read_cstr ( & mut self ) -> io:: Result < Bytes > {
297300 match memchr ( 0 , self . slice ( ) ) {
298301 Some ( pos) => {
@@ -309,6 +312,7 @@ impl Buffer {
309312 }
310313 }
311314
315+ #[ inline]
312316 fn read_all ( & mut self ) -> Bytes {
313317 let buf = self . bytes . slice_from ( self . idx ) ;
314318 self . idx = self . bytes . len ( ) ;
@@ -317,6 +321,7 @@ impl Buffer {
317321}
318322
319323impl Read for Buffer {
324+ #[ inline]
320325 fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
321326 let len = {
322327 let slice = self . slice ( ) ;
You can’t perform that action at this time.
0 commit comments