From 19caae4f534f1ebae71ad34a50fd9da4161f1399 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Fri, 6 Mar 2026 09:36:09 +0000 Subject: [PATCH] Rename safe-rust-zstd to zstd-safe-rust --- Cargo.toml | 4 ++-- src/decoder/image.rs | 2 +- tests/decode_images.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f4f5223..2896ebb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,8 +47,8 @@ lzw = ["dep:weezl"] webp = ["dep:image-webp"] zstd = ["dep:zstd"] # Fully safe Rust but much slower Zstd decoding. -# When both zstd and safe-rust-zstd are enabled, zstd takes precedence. -safe-rust-zstd = ["dep:ruzstd"] +# When both zstd and zstd-safe-rust are enabled, zstd takes precedence. +zstd-safe-rust = ["dep:ruzstd"] [[bench]] name = "lzw" diff --git a/src/decoder/image.rs b/src/decoder/image.rs index eb513fc..6d0dc24 100644 --- a/src/decoder/image.rs +++ b/src/decoder/image.rs @@ -659,7 +659,7 @@ impl Image { )), #[cfg(feature = "zstd")] CompressionMethod::ZSTD => Box::new(zstd::Decoder::new(reader)?), - #[cfg(all(not(feature = "zstd"), feature = "safe-rust-zstd"))] + #[cfg(all(not(feature = "zstd"), feature = "zstd-safe-rust"))] CompressionMethod::ZSTD => Box::new( ruzstd::decoding::StreamingDecoder::new(reader) .map_err(|e| std::io::Error::other(e))?, diff --git a/tests/decode_images.rs b/tests/decode_images.rs index 08314af..6e3deab 100644 --- a/tests/decode_images.rs +++ b/tests/decode_images.rs @@ -569,7 +569,7 @@ fn test_predictor_3_gray_f32() { } #[test] -#[cfg(any(feature = "zstd", feature = "safe-rust-zstd"))] +#[cfg(any(feature = "zstd", feature = "zstd-safe-rust"))] fn test_zstd_compression() { // gdal_translate -co COMPRESS=ZSTD -co ZSTD_LEVEL=20 int16.tif int16_zstd.tif test_image_sum_i16("int16_zstd.tif", ColorType::Gray(16), 354396);