Skip to content

Commit

Permalink
Bump msrv to 1.81
Browse files Browse the repository at this point in the history
CI is breaking because of dev dependencies with newer rust version
requirement. 1.66 is pretty old now too.
  • Loading branch information
cberner committed Nov 6, 2024
1 parent 2388afc commit bb44154
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install Rust
if: steps.rust-cache.outputs.cache-hit != 'true'
run: |
rustup default 1.66
rustup default 1.81
rustup component add rustfmt
rustup component add clippy
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
license = "MIT OR Apache-2.0"
version = "2.2.0"
edition = "2021"
rust-version = "1.66"
rust-version = "1.81"
authors = ["Christopher Berner <[email protected]>"]
exclude = ["fuzz/"]

Expand Down
2 changes: 2 additions & 0 deletions benches/int_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use std::env::current_dir;
use std::fs;
use tempfile::{NamedTempFile, TempDir};
Expand Down
2 changes: 2 additions & 0 deletions benches/large_values_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

use std::env::current_dir;
use tempfile::{NamedTempFile, TempDir};

Expand Down
3 changes: 3 additions & 0 deletions benches/syscall_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ fn uring_bench(path: &Path) {
let mut file = OpenOptions::new()
.read(true)
.write(true)
.truncate(true)
.create(true)
.open(path)
.unwrap();
Expand Down Expand Up @@ -206,6 +207,7 @@ fn readwrite_bench(path: &Path) {
let mut file = OpenOptions::new()
.read(true)
.write(true)
.truncate(true)
.create(true)
.open(path)
.unwrap();
Expand Down Expand Up @@ -268,6 +270,7 @@ fn mmap_bench(path: &Path) {
let file = OpenOptions::new()
.read(true)
.write(true)
.truncate(true)
.create(true)
.open(path)
.unwrap();
Expand Down
2 changes: 2 additions & 0 deletions benches/userspace_cache_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ mod unix {
let file = OpenOptions::new()
.read(true)
.write(true)
.truncate(true)
.create(true)
.open(path)
.unwrap();
Expand Down Expand Up @@ -350,6 +351,7 @@ mod unix {
let file = OpenOptions::new()
.read(true)
.write(true)
.truncate(true)
.create(true)
.open(path)
.unwrap();
Expand Down
1 change: 1 addition & 0 deletions examples/special_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl SpecialValuesDb {
database: Database::create("index.redb").unwrap(),
file: OpenOptions::new()
.write(true)
.truncate(true)
.create(true)
.read(true)
.open("values.dat")
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.66
1.81
1 change: 1 addition & 0 deletions src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ pub enum Durability {
/// 2. can introduce crashes during fsync(),
/// 3. has knowledge of the database file contents, and
/// 4. can include arbitrary data in a write transaction
///
/// could cause a transaction to partially commit (some but not all of the data is written).
/// This is described in the design doc in futher detail.
///
Expand Down
5 changes: 4 additions & 1 deletion src/tree_store/page_store/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,10 @@ mod test {
// IETF Memo "Care and Feeding of Magic Numbers"

// Test that magic number is not valid utf-8
assert!(std::str::from_utf8(&MAGICNUMBER).is_err());
#[allow(invalid_from_utf8)]
{
assert!(std::str::from_utf8(&MAGICNUMBER).is_err());
}
// Test there is a octet with high-bit set
assert!(MAGICNUMBER.iter().any(|x| *x & 0x80 != 0));
// Test there is a non-printable ASCII character
Expand Down
2 changes: 1 addition & 1 deletion tests/basic_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ fn extract_if() {
let mut table = write_txn.open_table(U64_TABLE).unwrap();
assert_eq!(table.len().unwrap(), 10);
for _ in table.extract_if(|x, _| x % 2 != 0).unwrap() {}
table.extract_if(|_, _| true).unwrap().rev().next();
table.extract_if(|_, _| true).unwrap().next_back();
}
write_txn.commit().unwrap();

Expand Down

0 comments on commit bb44154

Please sign in to comment.