Check in CI compatibility with MSRV (#741)

master
Oleksandr Anyshchenko 2 years ago committed by GitHub
parent 1c879f073f
commit e646999c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .github/workflows/rust.yml
  2. 1
      Cargo.toml
  3. 1
      librocksdb-sys/Cargo.toml
  4. 10
      src/transactions/transaction_db.rs

@ -1,6 +1,8 @@
name: RocksDB CI name: RocksDB CI
on: [push, pull_request] on: [push, pull_request]
env:
RUST_VERSION: 1.60.0
jobs: jobs:
fmt: fmt:
@ -12,7 +14,7 @@ jobs:
- name: Install rust - name: Install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: ${{ env.RUST_VERSION }}
components: rustfmt components: rustfmt
profile: minimal profile: minimal
override: true override: true
@ -31,7 +33,7 @@ jobs:
- name: Install rust - name: Install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: ${{ env.RUST_VERSION }}
components: clippy components: clippy
profile: minimal profile: minimal
override: true override: true
@ -69,7 +71,7 @@ jobs:
- name: Install rust - name: Install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ matrix.rust || 'stable' }} toolchain: ${{ env.RUST_VERSION }}
target: ${{ matrix.target }} target: ${{ matrix.target }}
profile: minimal profile: minimal
override: true override: true

@ -3,6 +3,7 @@ name = "rocksdb"
description = "Rust wrapper for Facebook's RocksDB embeddable database" description = "Rust wrapper for Facebook's RocksDB embeddable database"
version = "0.20.0" version = "0.20.0"
edition = "2018" edition = "2018"
rust-version = "1.60"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"] authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"]
repository = "https://github.com/rust-rocksdb/rust-rocksdb" repository = "https://github.com/rust-rocksdb/rust-rocksdb"
license = "Apache-2.0" license = "Apache-2.0"

@ -2,6 +2,7 @@
name = "librocksdb-sys" name = "librocksdb-sys"
version = "0.10.0+7.9.2" version = "0.10.0+7.9.2"
edition = "2018" edition = "2018"
rust-version = "1.60"
authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>"] authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>"]
license = "MIT/Apache-2.0/BSD-3-Clause" license = "MIT/Apache-2.0/BSD-3-Clause"
description = "Native bindings to librocksdb" description = "Native bindings to librocksdb"

@ -57,7 +57,7 @@ type DefaultThreadMode = crate::MultiThreaded;
/// { /// {
/// let db: TransactionDB = TransactionDB::open_default(path).unwrap(); /// let db: TransactionDB = TransactionDB::open_default(path).unwrap();
/// db.put(b"my key", b"my value").unwrap(); /// db.put(b"my key", b"my value").unwrap();
/// ///
/// // create transaction /// // create transaction
/// let txn = db.transaction(); /// let txn = db.transaction();
/// txn.put(b"key2", b"value2"); /// txn.put(b"key2", b"value2");
@ -359,11 +359,9 @@ impl<T: ThreadMode> TransactionDB<T> {
name: &str, name: &str,
opts: &Options, opts: &Options,
) -> Result<*mut ffi::rocksdb_column_family_handle_t, Error> { ) -> Result<*mut ffi::rocksdb_column_family_handle_t, Error> {
let Ok(cf_name) = CString::new(name.as_bytes()) else { let cf_name = CString::new(name.as_bytes()).map_err(|_| {
return Err(Error::new( Error::new("Failed to convert path to CString when creating cf".to_owned())
"Failed to convert path to CString when creating cf".to_owned(), })?;
));
};
Ok(unsafe { Ok(unsafe {
ffi_try!(ffi::rocksdb_transactiondb_create_column_family( ffi_try!(ffi::rocksdb_transactiondb_create_column_family(

Loading…
Cancel
Save