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

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

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

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

Loading…
Cancel
Save