diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664c21d6d..5b3d43d80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ on: - ".github/workflows/audit.yml" - ".github/workflows/performance.yml" merge_group: - types: [checks_requested] + types: [ checks_requested ] schedule: - cron: "0 0 * * 0" # Weekly on Sunday at midnight UTC workflow_dispatch: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 0ef1cabf6..ed2303ad6 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -49,7 +49,7 @@ jobs: contents: read id-token: write env: - NIX_CURL_FLAGS: -A cargo/1.95.0 + NIX_CURL_FLAGS: -A cargo/stable steps: - name: Checkout repository uses: actions/checkout@v6 diff --git a/Cargo.toml b/Cargo.toml index 038da9bce..7715fb565 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ resolver = "3" edition = "2024" license = "Apache-2.0" repository = "https://github.com/rustfs/rustfs" -rust-version = "1.95.0" +rust-version = "1.96.0" version = "1.0.0-beta.7" homepage = "https://rustfs.com" description = "RustFS is a high-performance distributed object storage software built using Rust, one of the most popular languages worldwide. " diff --git a/crates/ecstore/tests/README.md b/crates/ecstore/tests/README.md index 51b776e2a..cb7b2f807 100644 --- a/crates/ecstore/tests/README.md +++ b/crates/ecstore/tests/README.md @@ -20,5 +20,5 @@ Example: ```powershell $env:RUSTFS_MINIO_FIXTURE_ROOT = '.\rustfs\tmp\minio-fixture-lab-local-key' $env:RUSTFS_MINIO_STATIC_KMS_KEY_B64 = '' -cargo +1.95.0 test -p rustfs-ecstore --features rio-v2 --test minio_generated_read_test -- --ignored +cargo +1.96.0 test -p rustfs-ecstore --features rio-v2 --test minio_generated_read_test -- --ignored ``` diff --git a/crates/lock/src/distributed_lock.rs b/crates/lock/src/distributed_lock.rs index 55c7be849..7b4cb1af9 100644 --- a/crates/lock/src/distributed_lock.rs +++ b/crates/lock/src/distributed_lock.rs @@ -800,6 +800,7 @@ mod tests { should_warn_lock_failure, }; use crate::{LockError, LockId, LockInfo, LockRequest, LockResponse, LockStats, LockType, ObjectKey, client::LockClient}; + use std::assert_matches; use std::{ collections::{HashMap, VecDeque}, sync::{Arc, Mutex}, @@ -1105,7 +1106,7 @@ mod tests { let result = lock.acquire_guard(&request).await; let elapsed = started.elapsed(); - assert!(matches!(result, Ok(None)), "unexpected result: {result:?}"); + assert_matches!(result, Ok(None)); assert!( elapsed >= Duration::from_millis(250), "remote RPC timeouts should be retried within the caller timeout, got {elapsed:?}" @@ -1131,7 +1132,7 @@ mod tests { let started = tokio::time::Instant::now(); let result = lock.acquire_guard(&request).await; - assert!(matches!(result, Ok(None)), "unexpected result: {result:?}"); + assert_matches!(result, Ok(None)); assert!( started.elapsed() < Duration::from_secs(1), "acquire should fail this attempt before waiting for delayed impossible-quorum tasks" @@ -1210,7 +1211,7 @@ mod tests { let result = lock.acquire_lock_quorum_with_retry(&request).await.unwrap(); - assert!(matches!(result.failure_kind, Some(LockAcquireFailureKind::NonRetryable))); + assert_matches!(result.failure_kind, Some(LockAcquireFailureKind::NonRetryable)); assert!( result .response @@ -1254,7 +1255,7 @@ mod tests { let result = lock.acquire_guard(&request).await; let elapsed = started.elapsed(); - assert!(matches!(result, Ok(None)), "unexpected result: {result:?}"); + assert_matches!(result, Ok(None)); assert!( elapsed >= Duration::from_millis(250), "expected at least one retry attempt for transient timeout, got {elapsed:?}" @@ -1273,7 +1274,7 @@ mod tests { let result = lock.acquire_guard(&request).await; - assert!(matches!(result, Ok(None)), "unexpected result: {result:?}"); + assert_matches!(result, Ok(None)); let seen_timeouts = seen_timeouts.lock().unwrap(); assert!(!seen_timeouts.is_empty(), "expected lock clients to observe acquire timeouts"); assert!( @@ -1297,7 +1298,7 @@ mod tests { let result = tokio::time::timeout(Duration::from_millis(800), lock.acquire_guard(&request)).await; - assert!(matches!(result, Ok(Ok(None))), "unexpected result: {result:?}"); + assert_matches!(result, Ok(Ok(None))); } #[tokio::test] diff --git a/crates/lock/src/error.rs b/crates/lock/src/error.rs index ff7c9b53b..18dfb4ac5 100644 --- a/crates/lock/src/error.rs +++ b/crates/lock/src/error.rs @@ -290,17 +290,18 @@ impl From for LockError { #[cfg(test)] mod tests { use super::*; + use std::assert_matches; #[test] fn test_error_creation() { let timeout_err = LockError::timeout("test-resource", Duration::from_secs(5)); - assert!(matches!(timeout_err, LockError::Timeout { .. })); + assert_matches!(timeout_err, LockError::Timeout { .. }); let not_found_err = LockError::resource_not_found("missing-resource"); - assert!(matches!(not_found_err, LockError::ResourceNotFound { .. })); + assert_matches!(not_found_err, LockError::ResourceNotFound { .. }); let permission_err = LockError::permission_denied("insufficient privileges"); - assert!(matches!(permission_err, LockError::PermissionDenied { .. })); + assert_matches!(permission_err, LockError::PermissionDenied { .. }); } #[test] diff --git a/crates/rio-v2/tests/README.md b/crates/rio-v2/tests/README.md index 7bbc39599..3c69d8b28 100644 --- a/crates/rio-v2/tests/README.md +++ b/crates/rio-v2/tests/README.md @@ -30,7 +30,7 @@ Or point the tests at another generated root: ```powershell $env:RUSTFS_MINIO_FIXTURE_ROOT = '.\rustfs\tmp\minio-fixture-lab-smoke' -cargo +1.95.0 test -p rustfs-rio-v2 --test minio_generated_fixtures -- --ignored +cargo +1.96.0 test -p rustfs-rio-v2 --test minio_generated_fixtures -- --ignored ``` ## Scope diff --git a/rustfs/src/table_catalog.rs b/rustfs/src/table_catalog.rs index e9654f211..59b7bde6d 100644 --- a/rustfs/src/table_catalog.rs +++ b/rustfs/src/table_catalog.rs @@ -1725,6 +1725,7 @@ fn is_lower_ascii_alnum(value: u8) -> bool { #[cfg(test)] mod tests { use super::*; + use std::assert_matches; #[test] fn reserved_table_object_key_matches_exact_prefix_and_children_only() { @@ -2490,7 +2491,7 @@ mod tests { .await .unwrap_err(); - assert!(matches!(err, TableCatalogStoreError::Conflict(_))); + assert_matches!(err, TableCatalogStoreError::Conflict(_)); assert!(backend.object_exists(bucket, &old).await.unwrap()); } @@ -2690,7 +2691,7 @@ mod tests { .await .unwrap_err(); - assert!(matches!(err, TableCatalogStoreError::Internal(_))); + assert_matches!(err, TableCatalogStoreError::Internal(_)); let loaded = store.load_table(bucket, "sales", "orders").await.unwrap().unwrap(); assert_eq!(loaded.metadata_location, current_metadata); assert_eq!(loaded.version_token, "token-v1"); @@ -2789,7 +2790,7 @@ mod tests { .await .unwrap_err(); - assert!(matches!(err, TableCatalogStoreError::Conflict(_))); + assert_matches!(err, TableCatalogStoreError::Conflict(_)); let loaded = store.load_table(bucket, "sales", "orders").await.unwrap().unwrap(); assert_eq!(loaded.metadata_location, current_metadata); assert_eq!(loaded.version_token, "token-v1");