Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump msrv to 1.81 #889

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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