File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
datadog-profiling-protobuf/src Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,11 @@ impl Value for Varint {
20
20
( ( ( ( self . 0 | 1 ) . leading_zeros ( ) ^ 63 ) * 9 + 73 ) / 64 ) as u64
21
21
}
22
22
23
- /// Encodes a varint according to protobuf semantics.
23
+ /// Encodes a [` varint`] according to protobuf semantics.
24
24
///
25
- /// Note that it will write between 1 and 10 bytes, inclusive. You should
26
- /// probably write to a buffered Write object--if you write directly to
27
- /// something like a TCP stream, it's going to send one byte at a time,
28
- /// which is excessively inefficient. In libdatadog, we typically write to
29
- /// some sort of compressor which has its own input buffer.
25
+ /// Serialization happens one byte at a time; use a buffered writer.
30
26
///
31
- /// See https://protobuf.dev/programming-guides/encoding/#varints
27
+ /// [`varint`]: https://protobuf.dev/programming-guides/encoding/#varints
32
28
#[ inline]
33
29
fn encode < W : Write > ( & self , writer : & mut W ) -> io:: Result < ( ) > {
34
30
let mut value = self . 0 ;
You can’t perform that action at this time.
0 commit comments