Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
modelflat committed Feb 4, 2024
1 parent 8356155 commit 8ac3005
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 71 deletions.
16 changes: 0 additions & 16 deletions .github/actions/install-rust-toolchain/action.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
- ubuntu-22.04
- windows-2022
toolchain:
- 1.71.1
- 1.75.0
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: install Rust toolchain
uses: ./.github/actions/install-rust-toolchain
with:
toolchain: ${{ matrix.toolchain }}
- name: install rust
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --no-self-update
rustup default ${{ matrix.toolchain }}
- name: run tests
run: cargo test --all
86 changes: 48 additions & 38 deletions Cargo.lock

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

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[package]
name = "hloo"
version = "0.1.0"
version.workspace = true
edition = "2021"

[workspace]
package.version = "0.1.0"
members = ["hloo_core", "hloo_macros", "data_gen"]

[dependencies]
hloo_core = { path = "hloo_core" }
hloo_macros = { path = "hloo_macros" }
thiserror = "1"
memmap2 = { version = "0.7" }
fs4 = { version = "0.6", features = ["sync"] }
tempfile = { version = "3" }
memmap2 = "0.9"
fs4 = "0.7"
tempfile = "3"

[dev-dependencies]
data_gen = { path = "data_gen" }
Expand Down
2 changes: 1 addition & 1 deletion benches/search256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn generate_perfect_data(n: usize, _: usize) -> Vec<(Bits, usize)> {
}

fn generate_bad_data(n: usize, block_size: usize) -> Vec<(Bits, usize)> {
generate_uniform_data_with_block_size(n, block_size, false, Bits::new).collect()
generate_uniform_data_with_block_size(n, block_size, true, Bits::new).collect()
}

fn generate_target(data: &[(Bits, usize)], change_bits: usize) -> Bits {
Expand Down
2 changes: 1 addition & 1 deletion benches/search64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn generate_perfect_data(n: usize, _: usize) -> Vec<(Bits, usize)> {
}

fn generate_bad_data(n: usize, block_size: usize) -> Vec<(Bits, usize)> {
generate_uniform_data_with_block_size(n, block_size, false, |d| Bits::new([d[0]])).collect()
generate_uniform_data_with_block_size(n, block_size, true, |d| Bits::new([d[0]])).collect()
}

fn generate_target(data: &[(Bits, usize)], change_bits: usize) -> Bits {
Expand Down
4 changes: 2 additions & 2 deletions data_gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "data_gen"
version = "0.1.0"
version.workspace = true
edition = "2021"

[dependencies]
rand = "0.8"
itertools = "0.11"
itertools = "0.12"
4 changes: 2 additions & 2 deletions hloo_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hloo_core"
version = "1.0.0"
version.workspace = true
edition = "2021"

[dependencies]
itertools = "0.11"
itertools = "0.12"
2 changes: 1 addition & 1 deletion hloo_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hloo_macros"
version = "1.0.0"
version.workspace = true
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::collections::HashSet;

use hloo::index::{Candidates, SearchResultItem};

hloo::init_lookup!(LookupUtil, 32, 5, 1, 32);
// 7 7 6 6 6
hloo::init_lookup!(LookupUtil, 32, 5, 1, 32);

fn generate_data(n: usize) -> Vec<(Bits, i64)> {
let mut data = Vec::new();
Expand Down

0 comments on commit 8ac3005

Please sign in to comment.