diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ec62043..75a460e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,51 +9,33 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Install rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 + toolchain: 1.89.0 components: rustfmt - profile: minimal - override: true - - name: Run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: Check formatting + run: | + cargo fmt --all -- --check clippy: name: Clippy runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: submodules: true - name: Install rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 - components: clippy - profile: minimal - override: true + toolchain: 1.89.0 + components: clippy rustfmt - run: sudo apt update && sudo apt install -y libclang-dev - name: Run clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all --tests -- -A clippy::upper-case-acronyms -A clippy::missing_safety_doc -D warnings - - audit: - name: Security audit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - + run: | + make clippy valgrind: name: valgrind @@ -61,7 +43,7 @@ jobs: steps: - run: sudo apt update && sudo apt install -y valgrind libclang-dev - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: submodules: true - name: run test @@ -79,7 +61,7 @@ jobs: - build: Linux os: ubuntu-22.04 - build: macOS - os: macos-12 + os: macos-latest - build: windows-2022 os: windows-2022 steps: @@ -92,67 +74,57 @@ jobs: remove-dotnet: 'true' remove-android: 'true' remove-haskell: 'true' + remove-codeql: 'true' + remove-docker-images: 'true' + - name: Delete huge unnecessary tools folder + if: runner.os == 'Linux' + run: rm -rf /opt/hostedtoolcache - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: submodules: true - name: Install rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 + toolchain: 1.89.0 target: ${{ matrix.target }} - profile: minimal - override: true + components: rustfmt - name: Remove msys64 # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll if: runner.os == 'Windows' run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - name: Install dependencies if: runner.os == 'Windows' run: choco install llvm -y - - name: Install libclang-dev + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: brew install llvm lld + - name: Install dependencies (Linux) if: runner.os == 'Linux' - run: sudo apt install libclang-dev - - name: Install jemalloc - if: runner.os == 'Linux' - run: sudo apt install libjemalloc-dev - - name: Install liburing - if: runner.os == 'Linux' - run: sudo apt install liburing-dev + run: sudo apt-get update && sudo apt-get install -y libclang-dev libjemalloc-dev liburing-dev - name: Debug librocksdb-sys tests if: runner.os == 'Linux' || runner.os == 'Windows' run: clang --version && env - name: Run librocksdb-sys tests if: runner.os == 'Linux' || runner.os == 'Windows' - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path=librocksdb-sys/Cargo.toml -vvvvv + run: | + cargo test --manifest-path=librocksdb-sys/Cargo.toml -vvvvv - name: Run rocksdb tests if: runner.os == 'Linux' || runner.os == 'Windows' - uses: actions-rs/cargo@v1 - with: - command: test + run: | + cargo test - name: Run rocksdb tests (jemalloc) if: runner.os == 'Linux' - uses: actions-rs/cargo@v1 - with: - command: test - args: --features jemalloc + run: | + cargo test --features jemalloc - name: Run rocksdb tests (io-uring) if: runner.os == 'Linux' - uses: actions-rs/cargo@v1 - with: - command: test - args: --features io-uring + run: | + cargo test --features io-uring - name: Run rocksdb tests (portable) if: runner.os == 'Linux' || runner.os == 'macOS' - uses: actions-rs/cargo@v1 - with: - command: test - args: --features portable + run: | + cargo test --features portable - name: Run rocksdb tests (march-native) if: runner.os == 'Linux' - uses: actions-rs/cargo@v1 - with: - command: test - args: --features march-native + run: | + cargo test --features march-native diff --git a/.gitmodules b/.gitmodules index 852eb02..0d19a17 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,7 +9,7 @@ url = https://github.com/lz4/lz4.git [submodule "librocksdb-sys/zstd"] path = librocksdb-sys/zstd - url = https://github.com/facebook/zstd + url = https://github.com/facebook/zstd.git [submodule "librocksdb-sys/zlib"] path = librocksdb-sys/zlib url = https://github.com/madler/zlib.git diff --git a/Cargo.toml b/Cargo.toml index 765c73b..268395c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" authors = ["Tyler Neely ", "David Greenberg ", "Nervos Core Dev "] license = "Apache-2.0" keywords = ["database", "embedded", "LSM-tree", "persistence"] -repository = "https://github.com/nervosnetwork/rust-rocksdb" +repository = "https://github.com/nervosnetwork/ckb-rocksdb" exclude = [ ".gitignore", "*.yml", @@ -14,7 +14,7 @@ exclude = [ "*.md", "benches", ] -rust-version = "1.85.0" +rust-version = "1.89.0" [features] default = ["snappy", "lz4", "zstd", "zlib", "bzip2"] @@ -30,6 +30,7 @@ portable = ["librocksdb-sys/portable"] march-native = ["librocksdb-sys/march-native"] serde1 = ["serde"] lto = ["librocksdb-sys/lto"] +rtti = ["librocksdb-sys/rtti"] [dependencies] home = "0.5" @@ -40,7 +41,7 @@ serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] trybuild = "1.0" -criterion = "0.5" +criterion = "0.7" [[bench]] name = "transaction" diff --git a/README.md b/README.md index c7ab87b..0f5fc7c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -rust-rocksdb +ckb-rocksdb ============ -[![Build Status](https://github.com/nervosnetwork/rust-rocksdb/actions/workflows/rust.yml/badge.svg?branch=txn)](https://github.com/nervosnetwork/rust-rocksdb/actions/workflows/rust.yml?query=branch%3Atxn) +[![Build Status](https://github.com/nervosnetwork/ckb-rocksdb/actions/workflows/rust.yml/badge.svg)](https://github.com/nervosnetwork/ckb-rocksdb/actions/workflows/rust.yml?query=branch%3Amaster) [![crates.io](https://img.shields.io/crates/v/ckb-rocksdb.svg)](https://crates.io/crates/ckb-rocksdb) [![documentation](https://docs.rs/ckb-rocksdb/badge.svg)](https://docs.rs/ckb-rocksdb) -[![license](https://img.shields.io/crates/l/ckb-rocksdb.svg)](https://github.com/nervosnetwork/rust-rocksdb/blob/txn/LICENSE) +[![license](https://img.shields.io/crates/l/ckb-rocksdb.svg)](https://github.com/nervosnetwork/ckb-rocksdb/blob/master/LICENSE) [![Discord](https://img.shields.io/badge/chat-on%20Discord-7289DA.svg)](https://discord.com/invite/nervos) diff --git a/librocksdb-sys/Cargo.toml b/librocksdb-sys/Cargo.toml index b86d774..21869f6 100644 --- a/librocksdb-sys/Cargo.toml +++ b/librocksdb-sys/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Karl Hobley ", "Arkadiy Paronyan Option> { if !cfg!(target_os = "windows") { @@ -138,6 +142,10 @@ fn build_rocksdb() { config.include("bzip2/"); } + if cfg!(feature = "rtti") { + config.define("USE_RTTI", Some("1")); + } + // rust-rocksdb/rust-rocksdb: // https://github.com/rust-rocksdb/rust-rocksdb/commit/b2dab4a0915eed72741657f783118d9220d4f070 // @@ -147,8 +155,8 @@ fn build_rocksdb() { config.flag("-flto"); if !config.get_compiler().is_like_clang() { panic!( - "LTO is only supported with clang. Either disable the `lto` feature\ - or set `CC=/usr/bin/clang CXX=/usr/bin/clang++` environment variables." + "LTO is only supported with clang. Either disable the `lto` feature \ + or set `CC=/usr/bin/clang CXX=/usr/bin/clang++` environment variables." ); } } @@ -286,25 +294,30 @@ fn build_rocksdb() { config.flag("-Wno-missing-field-initializers"); config.flag("-Wno-strict-aliasing"); config.flag("-Wno-invalid-offsetof"); + } - if cfg!(feature = "jemalloc") { - if let Err(e) = pkg_config::probe_library("jemalloc") { - panic!("pkg_config jemalloc {}", e); - } else { - config.define("ROCKSDB_JEMALLOC", None); - config.define("JEMALLOC_NO_DEMANGLE", None); - } + config.define("ROCKSDB_SUPPORT_THREAD_LOCAL", None); + if target.contains("linux") { + if cfg!(feature = "io-uring") { + pkg_config::probe_library("liburing") + .expect("The io-uring feature was requested but the library is not available"); + config.define("ROCKSDB_IOURING_PRESENT", Some("1")); } + } - if cfg!(feature = "io-uring") { - if let Err(e) = pkg_config::probe_library("liburing") { - panic!("pkg_config liburing {}", e); - } else { - config.define("ROCKSDB_IOURING_PRESENT", None); - } + if cfg!(feature = "jemalloc") && NO_JEMALLOC_TARGETS.iter().all(|i| !target.contains(i)) { + config.define("ROCKSDB_JEMALLOC", Some("1")); + config.define("JEMALLOC_NO_DEMANGLE", Some("1")); + if let Some(jemalloc_root) = env::var_os("DEP_JEMALLOC_ROOT") { + config.include(Path::new(&jemalloc_root).join("include")); } } + config.flag_if_supported("-std=c++17"); + if !target.contains("windows") { + config.flag("-include").flag("cstdint"); + } + for file in lib_sources { let file = "rocksdb/".to_string() + file; config.file(&file); @@ -315,8 +328,6 @@ fn build_rocksdb() { config.cpp(true); - config.flag("-include").flag("cstdint"); - config.compile("librocksdb.a"); } @@ -376,6 +387,8 @@ fn build_zstd() { compiler.include("zstd/lib/common"); compiler.include("zstd/lib/legacy"); + let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default(); + let globs = &[ "zstd/lib/common/*.c", "zstd/lib/compress/*.c", @@ -391,8 +404,22 @@ fn build_zstd() { } } + if target_arch.contains("x86_64") { + if env::var("CARGO_CFG_WINDOWS").is_ok() { + compiler.define("ZSTD_DISABLE_ASM", Some("")); + } else { + compiler.file("zstd/lib/decompress/huf_decompress_amd64.S"); + } + } else { + compiler.define("ZSTD_DISABLE_ASM", Some("")); + } + compiler.opt_level(3); compiler.extra_warnings(false); + compiler + .flag_if_supported("-ffunction-sections") + .flag_if_supported("-fdata-sections") + .flag_if_supported("-fmerge-all-constants"); compiler.define("ZSTD_LIB_DEPRECATED", Some("0")); compiler.compile("libzstd.a"); @@ -501,4 +528,6 @@ fn main() { fail_on_empty_directory("bzip2"); build_bzip2(); } + + println!("cargo:out_dir={}", env::var("OUT_DIR").unwrap()); } diff --git a/librocksdb-sys/bzip2/LICENSE b/librocksdb-sys/bzip2/LICENSE index cc61417..81a37ea 100644 --- a/librocksdb-sys/bzip2/LICENSE +++ b/librocksdb-sys/bzip2/LICENSE @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2010 Julian R Seward. All +documentation, are copyright (C) 1996-2019 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.8 of 13 July 2019 -------------------------------------------------------------------------- diff --git a/librocksdb-sys/bzip2/blocksort.c b/librocksdb-sys/bzip2/blocksort.c index d0d662c..92d81fe 100644 --- a/librocksdb-sys/bzip2/blocksort.c +++ b/librocksdb-sys/bzip2/blocksort.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, bhtab [ 0 .. 2+(nblock/32) ] destroyed */ -#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31))) +#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) #define WORD_BH(zz) bhtab[(zz) >> 5] #define UNALIGNED_BH(zz) ((zz) & 0x01f) diff --git a/librocksdb-sys/bzip2/bzlib.c b/librocksdb-sys/bzip2/bzlib.c index bd358a7..2178655 100644 --- a/librocksdb-sys/bzip2/bzlib.c +++ b/librocksdb-sys/bzip2/bzlib.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -43,12 +43,12 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to me at: jseward@bzip.org. If this happened\n" + "Please report it to: bzip2-devel@sourceware.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" "timely and accurate bug reports eventually lead to higher\n" - "quality software. Thanks. Julian Seward, 10 December 2007.\n\n", + "quality software. Thanks.\n\n", errcode, BZ2_bzlibVersion() ); diff --git a/librocksdb-sys/bzip2/bzlib.h b/librocksdb-sys/bzip2/bzlib.h index 8277123..8966a6c 100644 --- a/librocksdb-sys/bzip2/bzlib.h +++ b/librocksdb-sys/bzip2/bzlib.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/librocksdb-sys/bzip2/bzlib_private.h b/librocksdb-sys/bzip2/bzlib_private.h index 5d0217f..3755a6f 100644 --- a/librocksdb-sys/bzip2/bzlib_private.h +++ b/librocksdb-sys/bzip2/bzlib_private.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.6, 6-Sept-2010" +#define BZ_VERSION "1.0.8, 13-Jul-2019" typedef char Char; typedef unsigned char Bool; diff --git a/librocksdb-sys/bzip2/compress.c b/librocksdb-sys/bzip2/compress.c index caf7696..5dfa002 100644 --- a/librocksdb-sys/bzip2/compress.c +++ b/librocksdb-sys/bzip2/compress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -454,7 +454,7 @@ void sendMTFValues ( EState* s ) AssertH( nGroups < 8, 3002 ); AssertH( nSelectors < 32768 && - nSelectors <= (2 + (900000 / BZ_G_SIZE)), + nSelectors <= BZ_MAX_SELECTORS, 3003 ); diff --git a/librocksdb-sys/bzip2/crctable.c b/librocksdb-sys/bzip2/crctable.c index 1fea7e9..2b33c25 100644 --- a/librocksdb-sys/bzip2/crctable.c +++ b/librocksdb-sys/bzip2/crctable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/librocksdb-sys/bzip2/decompress.c b/librocksdb-sys/bzip2/decompress.c index 311f566..a1a0bac 100644 --- a/librocksdb-sys/bzip2/decompress.c +++ b/librocksdb-sys/bzip2/decompress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -285,7 +285,7 @@ Int32 BZ2_decompress ( DState* s ) /*--- Now the selectors ---*/ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); + if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); if (nSelectors < 1) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { @@ -296,8 +296,14 @@ Int32 BZ2_decompress ( DState* s ) j++; if (j >= nGroups) RETURN(BZ_DATA_ERROR); } - s->selectorMtf[i] = j; + /* Having more than BZ_MAX_SELECTORS doesn't make much sense + since they will never be used, but some implementations might + "round up" the number of selectors, so just ignore those. */ + if (i < BZ_MAX_SELECTORS) + s->selectorMtf[i] = j; } + if (nSelectors > BZ_MAX_SELECTORS) + nSelectors = BZ_MAX_SELECTORS; /*--- Undo the MTF values for the selectors. ---*/ { diff --git a/librocksdb-sys/bzip2/huffman.c b/librocksdb-sys/bzip2/huffman.c index 2283fdb..43a1899 100644 --- a/librocksdb-sys/bzip2/huffman.c +++ b/librocksdb-sys/bzip2/huffman.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/librocksdb-sys/bzip2/randtable.c b/librocksdb-sys/bzip2/randtable.c index 6d62459..bdc6d4a 100644 --- a/librocksdb-sys/bzip2/randtable.c +++ b/librocksdb-sys/bzip2/randtable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.6 of 6 September 2010 - Copyright (C) 1996-2010 Julian Seward + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/librocksdb-sys/snappy b/librocksdb-sys/snappy index 2c94e11..6af9287 160000 --- a/librocksdb-sys/snappy +++ b/librocksdb-sys/snappy @@ -1 +1 @@ -Subproject commit 2c94e11145f0b7b184b831577c93e5a41c4c0346 +Subproject commit 6af9287fbdb913f0794d0148c6aa43b58e63c8e3 diff --git a/librocksdb-sys/tests/ffi.rs b/librocksdb-sys/tests/ffi.rs index 9a46a2b..a418d7d 100644 --- a/librocksdb-sys/tests/ffi.rs +++ b/librocksdb-sys/tests/ffi.rs @@ -20,7 +20,8 @@ non_upper_case_globals, unused_mut, unused_unsafe, - unused_variables + unused_variables, + static_mut_refs )] #[macro_use] diff --git a/librocksdb-sys/zlib b/librocksdb-sys/zlib index cacf7f1..51b7f2a 160000 --- a/librocksdb-sys/zlib +++ b/librocksdb-sys/zlib @@ -1 +1 @@ -Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f +Subproject commit 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf diff --git a/librocksdb-sys/zstd b/librocksdb-sys/zstd index a488ba1..f8745da 160000 --- a/librocksdb-sys/zstd +++ b/librocksdb-sys/zstd @@ -1 +1 @@ -Subproject commit a488ba114ec17ea1054b9057c26a046fc122b3b6 +Subproject commit f8745da6ff1ad1e7bab384bd1f9d742439278e99 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c1bc0a6..b67e7d5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.85.0" +channel = "1.89.0" diff --git a/src/ops/multi_get.rs b/src/ops/multi_get.rs index d48992c..94d2162 100644 --- a/src/ops/multi_get.rs +++ b/src/ops/multi_get.rs @@ -192,22 +192,22 @@ where pub trait BatchedMultiGetCF { fn batched_multi_get_cf_full<'a, K, I>( - &self, + &'a self, cf: &ColumnFamily, keys: I, sorted_input: bool, readopts: Option<&R>, - ) -> Vec, Error>> + ) -> Vec>, Error>> where K: AsRef<[u8]> + 'a + ?Sized, I: IntoIterator; fn batched_multi_get_cf<'a, K, I>( - &self, + &'a self, cf: &ColumnFamily, keys: I, sorted_input: bool, - ) -> Vec, Error>> + ) -> Vec>, Error>> where K: AsRef<[u8]> + 'a + ?Sized, I: IntoIterator, @@ -216,12 +216,12 @@ pub trait BatchedMultiGetCF { } fn batched_multi_get_cf_opt<'a, K, I>( - &self, + &'a self, cf: &ColumnFamily, keys: I, sorted_input: bool, readopts: &R, - ) -> Vec, Error>> + ) -> Vec>, Error>> where K: AsRef<[u8]> + 'a + ?Sized, I: IntoIterator, @@ -235,12 +235,12 @@ where T: Handle + super::Read, { fn batched_multi_get_cf_full<'a, K, I>( - &self, + &'a self, cf: &ColumnFamily, keys: I, sorted_input: bool, readopts: Option<&ReadOptions>, - ) -> Vec, Error>> + ) -> Vec>, Error>> where K: AsRef<[u8]> + 'a + ?Sized, I: IntoIterator,