Skip to content

Commit 2a2a24b

Browse files
committed
Bump crate version to 0.12.1 and edition to 2024
1 parent 0440a52 commit 2a2a24b

22 files changed

Lines changed: 87 additions & 75 deletions

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "reductionist"
3-
version = "0.12.0"
4-
edition = "2021"
3+
version = "0.12.1"
4+
edition = "2024"
55
rust-version = "1.93.0"
66
license = "Apache-2.0"
77
description = "S3 Active Storage server"

benches/byte_order.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Benchmarks for the byte order reversal implementation.
2-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
2+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
33
use reductionist::array::{build_array_mut_from_shape, get_shape, reverse_array_byte_order};
44
use reductionist::models::{DType, RequestData, Slice};
55
use url::Url;

benches/compression.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// Benchmarks for the byte shuffle filter implementation.
2-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
2+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
33
use reductionist::compression;
44
use reductionist::models;
55

66
use axum::body::Bytes;
7-
use blusc::{blosc2_compress, BLOSC2_MAX_OVERHEAD, BLOSC_SHUFFLE};
8-
use flate2::read::{GzEncoder, ZlibEncoder};
7+
use blusc::{BLOSC_SHUFFLE, BLOSC2_MAX_OVERHEAD, blosc2_compress};
98
use flate2::Compression;
9+
use flate2::read::{GzEncoder, ZlibEncoder};
1010
use std::io::Read;
1111
// Bring trait into scope to use as_bytes method.
1212
use zerocopy::AsBytes;

benches/operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Benchmarks for numerical operations.
2-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
2+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
33
use reductionist::error::ActiveStorageError;
44
use reductionist::models::{DType, RequestData, Response};
55
use reductionist::operation::Operation;

benches/s3_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/// Benchmarks for S3 client implementation.
22
use aws_credential_types::Credentials;
3-
use aws_sdk_s3::primitives::ByteStream;
43
use aws_sdk_s3::Client;
4+
use aws_sdk_s3::primitives::ByteStream;
55
use aws_types::region::Region;
66
use axum::body::Bytes;
7-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
7+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
88
use reductionist::resource_manager::ResourceManager;
99
use reductionist::s3_client::{S3Client, S3ClientMap, S3Credentials};
1010
use url::Url;

benches/shuffle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Benchmarks for the byte shuffle filter implementations.
22
use axum::body::Bytes;
3-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
3+
use criterion::{Criterion, black_box, criterion_group, criterion_main};
44
use reductionist::filters::shuffle;
55
use reductionist::filters::shuffle_simd;
66
// Bring trait into scope to use as_bytes method.

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ use crate::validated_json::ValidatedJson;
1212

1313
use axum::middleware;
1414
use axum::{
15+
Router, TypedHeader,
1516
extract::{Path, State},
1617
headers::authorization::{Authorization, Basic},
17-
http::header,
1818
http::StatusCode,
19+
http::header,
1920
response::{IntoResponse, Response},
2021
routing::{get, post},
21-
Router, TypedHeader,
2222
};
2323
use bytes::Bytes;
2424
use serde_cbor;

src/chunk_cache.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,10 @@ impl SimpleDiskCache {
516516
self.prune_expired().await;
517517
// Do we need to prune further to keep within a maximum size threshold?
518518
state = self.load_state().await;
519-
if let Some(max_size_bytes) = self.max_size_bytes {
520-
if state.current_size_bytes + headroom_bytes >= max_size_bytes {
521-
self.prune_disk_space(headroom_bytes).await?;
522-
}
519+
if let Some(max_size_bytes) = self.max_size_bytes
520+
&& state.current_size_bytes + headroom_bytes >= max_size_bytes
521+
{
522+
self.prune_disk_space(headroom_bytes).await?;
523523
}
524524
// Update state with the time of the next periodic pruning.
525525
state = self.load_state().await;

src/chunk_downloader_http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use crate::models;
44
use crate::resource_manager::ResourceManager;
55

66
use axum::{
7-
headers::authorization::{Authorization, Basic},
87
TypedHeader,
8+
headers::authorization::{Authorization, Basic},
99
};
1010
use bytes::Bytes;
1111
use tokio::sync::SemaphorePermit;
@@ -109,7 +109,7 @@ impl<'a> chunk_store::ChunkDownloader<'a> for ChunkDownloaderHTTP {
109109
_ => {
110110
return Err(ActiveStorageError::HTTPRequestError {
111111
error: format!("HTTP request failed with status: {}", response.status()),
112-
})
112+
});
113113
}
114114
},
115115
Err(e) => return Err(ActiveStorageError::from(e)),

0 commit comments

Comments
 (0)