Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikvanantwerpen committed Sep 24, 2024
1 parent c11f64f commit 27f6216
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/bpe/src/byte_pair_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ mod data {
if bpes.iter().all(|(bpe, len)| {
let mut seen = HashSet::with_capacity(*len);
(0..*len)
.into_iter()
.all(|i| seen.insert(hash_bytes_with_factor(&bpe._decode_native(&[i]), factor)))
}) {
println!("hash factor: {factor}");
Expand Down Expand Up @@ -621,7 +620,7 @@ mod data {
let abs_path = current_dir.parent().unwrap().parent().unwrap();
let file = File::create(abs_path.join(data_file)).unwrap();
let mut serializer = rmp_serde::Serializer::new(file);
BytePairEncoding::from_tiktoken(&dict, num_tokens)
BytePairEncoding::from_tiktoken(dict, num_tokens)
.serialize(&mut serializer)
.unwrap();
}
Expand Down
3 changes: 1 addition & 2 deletions crates/geo_filters/src/config/bitchunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ pub(crate) fn count_ones_from_bitchunks<T: IsBucketType>(
let mut total = take_ref(&mut ones, max_msb_len - 1).count();
let smallest_msb = ones
.next()
.map(|bucket| {
.inspect(|_| {
total += 1;
bucket
})
.unwrap_or_default();

Expand Down

0 comments on commit 27f6216

Please sign in to comment.