Skip to content

Commit

Permalink
Merge pull request #329 from weibocom/exitcode
Browse files Browse the repository at this point in the history
data_dump时,从buff起始打印所有内容
  • Loading branch information
FicoHu authored Jun 27, 2023
2 parents fe310e7 + 280bd47 commit d8a0519
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ds/src/mem/ring_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ impl RingSlice {

// 特殊情况下,打印合法字节,以及buff中全部的字节
pub unsafe fn data_dump(&self) -> &[u8] {
let oft_start = self.mask(self.start());
from_raw_parts(self.ptr().sub(oft_start), self.cap())
from_raw_parts(self.ptr(), self.cap())
}
#[inline(always)]
pub fn fold<I>(&self, mut init: I, mut v: impl FnMut(&mut I, u8)) -> I {
Expand Down

0 comments on commit d8a0519

Please sign in to comment.