Skip to content

Commit 80f6eda

Browse files
committed
don't use indirect ref to flags
Signed-off-by: Xintao <[email protected]>
1 parent c133a57 commit 80f6eda

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/call/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,12 +616,12 @@ impl WriteFlags {
616616
}
617617

618618
/// Get whether buffer hint is enabled.
619-
pub fn get_buffer_hint(&self) -> bool {
619+
pub fn get_buffer_hint(self) -> bool {
620620
(self.flags & grpc_sys::GRPC_WRITE_BUFFER_HINT) != 0
621621
}
622622

623623
/// Get whether compression is disabled.
624-
pub fn get_force_no_compress(&self) -> bool {
624+
pub fn get_force_no_compress(self) -> bool {
625625
(self.flags & grpc_sys::GRPC_WRITE_NO_COMPRESS) != 0
626626
}
627627
}
@@ -679,8 +679,7 @@ impl SinkBase {
679679
}
680680

681681
ser(t, &mut self.buffer);
682-
let hint = flags.get_buffer_hint();
683-
self.last_buf_hint &= hint;
682+
self.last_buf_hint &= flags.get_buffer_hint();
684683
self.buf_flags = Some(flags);
685684

686685
// If sink disable batch, start sending the message in buffer immediately.

0 commit comments

Comments
 (0)