From: Árpád Goretity  Date: Sun, 15 Jun 2025 09:09:20 +0000 (+0200) Subject: Update dependencies and replace deprecated `black_box()` with its std equivalent... X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1e2ccaa741013ae9a12dd8515aca0607004c52e2;p=safetensors.git Update dependencies and replace deprecated `black_box()` with its std equivalent (#614) --- diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 301cc9e..c1440f2 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -10,7 +10,7 @@ name = "safetensors_rust" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.24", features = ["abi3", "abi3-py38"] } +pyo3 = { version = "0.25", features = ["abi3", "abi3-py38"] } memmap2 = "0.9" serde_json = "1.0" diff --git a/safetensors/Cargo.toml b/safetensors/Cargo.toml index dd303d6..139a99d 100644 --- a/safetensors/Cargo.toml +++ b/safetensors/Cargo.toml @@ -2,7 +2,7 @@ name = "safetensors" version = "0.5.3-dev.0" edition = "2021" -rust-version = "1.74" +rust-version = "1.80" homepage = "https://github.com/huggingface/safetensors" repository = "https://github.com/huggingface/safetensors" documentation = "https://docs.rs/safetensors/" @@ -22,14 +22,14 @@ exclude = [ "rust-toolchain", "target/*", "Cargo.lock"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hashbrown = { version = "0.15.2", features = ["serde"], optional = true } +hashbrown = { version = "0.15.4", features = ["serde"], optional = true } serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = { version = "1.0", default-features = false } [dev-dependencies] -criterion = "0.5" +criterion = "0.6" memmap2 = "0.9" -proptest = "1.4" +proptest = "1.7" [features] default = ["std"] diff --git a/safetensors/benches/benchmark.rs b/safetensors/benches/benchmark.rs index 8bb490a..a8b7bc3 100644 --- a/safetensors/benches/benchmark.rs +++ b/safetensors/benches/benchmark.rs @@ -1,6 +1,7 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; +use criterion::{criterion_group, criterion_main, Criterion}; use safetensors::tensor::*; use std::collections::HashMap; +use std::hint::black_box; // Returns a sample data of size 2_MB fn get_sample_data() -> (Vec, Vec, Dtype) {