File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
postgres-protocol/src/message Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -285,14 +285,17 @@ struct Buffer {
285
285
}
286
286
287
287
impl Buffer {
288
+ #[ inline]
288
289
fn slice ( & self ) -> & [ u8 ] {
289
290
& self . bytes [ self . idx ..]
290
291
}
291
292
293
+ #[ inline]
292
294
fn is_empty ( & self ) -> bool {
293
295
self . slice ( ) . is_empty ( )
294
296
}
295
297
298
+ #[ inline]
296
299
fn read_cstr ( & mut self ) -> io:: Result < Bytes > {
297
300
match memchr ( 0 , self . slice ( ) ) {
298
301
Some ( pos) => {
@@ -309,6 +312,7 @@ impl Buffer {
309
312
}
310
313
}
311
314
315
+ #[ inline]
312
316
fn read_all ( & mut self ) -> Bytes {
313
317
let buf = self . bytes . slice_from ( self . idx ) ;
314
318
self . idx = self . bytes . len ( ) ;
@@ -317,6 +321,7 @@ impl Buffer {
317
321
}
318
322
319
323
impl Read for Buffer {
324
+ #[ inline]
320
325
fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
321
326
let len = {
322
327
let slice = self . slice ( ) ;
You can’t perform that action at this time.
0 commit comments