Skip to content

Commit 712bfa3

Browse files
Fix warnings
1 parent b21c533 commit 712bfa3

File tree

5 files changed

+29
-26
lines changed

5 files changed

+29
-26
lines changed

bin/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ cargo fmt -- --check
88
cargo readme > .README.md
99
diff README.md .README.md
1010

11-
cargo build
11+
cargo build --all-features --quiet
1212

1313
echo -e "\033[1;32mSUCCESS\033[0m"

bin/clean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
set -e
33

44
cargo clean
5-
rm .README.md
5+
rm -f .README.md

bin/test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ cargo test --benches
1717
# Run examples
1818
cargo run --example count_records
1919

20+
# Fail on Warning
21+
RUSTFLAGS="${RUSTFLAGS} -D warnings" cargo check --all-features
22+
2023
echo -e "\033[1;32mSUCCESS\033[0m"

src/bits/bitfield.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::traits::idxset::IdxSet;
22
use std::iter::{once, Once};
33
use std::ops::Range;
44

5-
pub(crate) const BITS: usize = (std::mem::size_of::<usize>() * 8);
5+
pub(crate) const BITS: usize = std::mem::size_of::<usize>() * 8;
66

77
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
88
pub(super) enum SortOrder {

src/queries/chunks.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@ use std::ops::RangeInclusive;
2525
pub struct Chunks<A>(pub A);
2626

2727
macro_rules! common_chunk_idxs_impl {
28-
() => {
29-
fn chunk_idxs(&self, storage: &Storage<ChunkKey, ItemKey, Element>) -> Self::ChunkIdxSet {
30-
self.0
31-
.iter()
32-
.filter_map(|x| storage.internal_idx_of(x.borrow()))
33-
.collect()
34-
}
35-
}
28+
() => {
29+
fn chunk_idxs(&self, storage: &Storage<ChunkKey, ItemKey, Element>) -> Self::ChunkIdxSet {
30+
self.0
31+
.iter()
32+
.filter_map(|x| storage.internal_idx_of(x.borrow()))
33+
.collect()
34+
}
35+
};
3636
}
3737

3838
macro_rules! common_item_idxs_impl {
39-
() => {
40-
fn item_idxs(
41-
&self,
42-
_chunk_key: &ChunkKey,
43-
chunk_storage: &ChunkStorage<ChunkKey, ItemKey, Element>,
44-
) -> Self::ItemIdxSet {
45-
IdxRange(0..chunk_storage.len())
46-
}
47-
}
39+
() => {
40+
fn item_idxs(
41+
&self,
42+
_chunk_key: &ChunkKey,
43+
chunk_storage: &ChunkStorage<ChunkKey, ItemKey, Element>,
44+
) -> Self::ItemIdxSet {
45+
IdxRange(0..chunk_storage.len())
46+
}
47+
};
4848
}
4949

5050
macro_rules! common_test_impl {
51-
() => {
52-
#[inline(always)]
53-
fn test(&self, _element: &Element) -> bool {
54-
true
55-
}
56-
}
51+
() => {
52+
#[inline(always)]
53+
fn test(&self, _element: &Element) -> bool {
54+
true
55+
}
56+
};
5757
}
5858

5959
impl<Q, ChunkKey, ItemKey, Element> Query<ChunkKey, ItemKey, Element> for Chunks<Vec<Q>>

0 commit comments

Comments
 (0)