diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml deleted file mode 100644 index 85334d9..0000000 --- a/.github/workflows/mirror.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Mirroring - -on: - delete: - pull_request: - push: - branches: - - main - -jobs: - git-sync: - runs-on: ubuntu-latest - if: ${{ github.repository == 'pathscale/DataBucket' }} - steps: - - name: git-sync - uses: wei/git-sync@v3 - with: - source_repo: "git@github.com:pathscale/DataBucket.git" - source_branch: "main" - destination_repo: "git@github.com:insolvent-capital/DataBucket.git" - destination_branch: "main" - ssh_private_key: ${{ secrets._SSH_PRIVATE_KEY }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 895f7c7..d0e7949 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["codegen", "tools/create-data-file", "tools/dump-data-file"] [package] name = "data_bucket" -version = "0.3.6" +version = "0.3.9" edition = "2021" authors = ["Handy-caT"] license = "MIT" @@ -19,7 +19,7 @@ rkyv = { version = "0.8.9", features = ["uuid-1"] } lockfree = "0.5.1" uuid = { version = "1.11.0", features = ["v4"] } ordered-float = "5.0.0" -# indexset = { version = "0.12.3", features = ["concurrent", "cdc", "multimap"] } +indexset = { version = "=0.14.0", features = ["concurrent", "cdc", "multimap"] } # indexset = { package = "wt-indexset", path = "../indexset", version = "0.12.10", features = ["concurrent", "cdc", "multimap"] } -indexset = { package = "wt-indexset", version = "0.12.12", features = ["concurrent", "cdc", "multimap"] } +# indexset = { package = "wt-indexset", version = "0.12.12", features = ["concurrent", "cdc", "multimap"] } tokio = { version = "1", features = ["full"] } diff --git a/src/persistence/data/rkyv_data.rs b/src/persistence/data/rkyv_data.rs index 591afb9..557f707 100644 --- a/src/persistence/data/rkyv_data.rs +++ b/src/persistence/data/rkyv_data.rs @@ -15,7 +15,7 @@ pub fn parse_archived_row, S2: AsRef>( } accum }; - if data_length % 4 != 0 { + if !data_length.is_multiple_of(4) { data_length += 4 - data_length % 4; } @@ -116,7 +116,7 @@ mod test { .unwrap(); let parsed = parse_archived_row( &buffer, - &vec![ + &[ ("string1".to_string(), "String".to_string()), ("int1".to_string(), "i32".to_string()), ("string2".to_string(), "String".to_string()), diff --git a/src/persistence/data/util.rs b/src/persistence/data/util.rs index ad816e1..804b984 100644 --- a/src/persistence/data/util.rs +++ b/src/persistence/data/util.rs @@ -1,5 +1,5 @@ pub fn advance_accum_for_padding(mut accum: usize, padding: usize) -> usize { - if accum % padding != 0 { + if !accum.is_multiple_of(padding) { accum += padding - accum % padding; } accum diff --git a/src/util/sized.rs b/src/util/sized.rs index 1f7ea51..61ad529 100644 --- a/src/util/sized.rs +++ b/src/util/sized.rs @@ -5,7 +5,7 @@ use std::{mem, sync::Arc}; use uuid::Uuid; pub const fn align(len: usize) -> usize { - if len % 4 == 0 { + if len.is_multiple_of(4) { len } else { (len / 4 + 1) * 4 @@ -13,7 +13,7 @@ pub const fn align(len: usize) -> usize { } pub const fn align8(len: usize) -> usize { - if len % 8 == 0 { + if len.is_multiple_of(8) { len } else { (len / 8 + 1) * 8