Skip to content

Commit

Permalink
add peek
Browse files Browse the repository at this point in the history
  • Loading branch information
tickbh committed Sep 9, 2024
1 parent b212c55 commit 277899f
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 11 deletions.
16 changes: 14 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["algorithm-macro"]

[package]
name = "algorithm"
version = "0.1.7"
version = "0.1.9"
edition = "2021"
authors = ["tickbh <tickdream125@hotmail.com>"]
description = "about algorithm data structure, now has ttl with lru/lru-k/lfu/arc and slab/rbtree/roaring_bitmap/timer_wheelss, 关于算法常用的数据结构"
Expand All @@ -19,7 +19,8 @@ hashbrown="0.14"
log="0.4.22"

[dependencies.algorithm-macro]
path = "algorithm-macro"
# path = "algorithm-macro"
version = "0.1"

[dev-dependencies]
rand="0.8.5"
Expand Down
8 changes: 4 additions & 4 deletions src/buf/binary_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ impl Bt for BinaryMut {
self.as_slice()
}

fn advance(&mut self, n: usize) {
self.inc_start(n);
}

fn advance_chunk(&mut self, n: usize) -> &[u8] {
let cursor = self.cursor;
self.inc_start(n);
Expand All @@ -343,10 +347,6 @@ impl Bt for BinaryMut {
ret
}

fn advance(&mut self, n: usize) {
self.inc_start(n);
}

fn into_binary(self) -> Binary {
Binary::from(self.chunk().to_vec())
}
Expand Down
Loading

0 comments on commit 277899f

Please sign in to comment.