Skip to content

Commit ad151f3

Browse files
dyroDylan Ross
andauthored
fix: removes asm feature for sha2 (#1343)
* fix: removes asm feature for sha2 * chore(sdk): further limits thumbnail to prevent dead code errors --------- Co-authored-by: Dylan Ross <[email protected]>
1 parent dd52f23 commit ad151f3

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ serde_json = { version = "1.0.117", features = ["preserve_order"] }
177177
serde_with = "3.11.0"
178178
serde-transcode = "1.1.1"
179179
sha1 = "0.10.6"
180-
sha2 = { version = "0.10.6", features = ["asm"] }
180+
sha2 = "0.10.6"
181181
spki = { version = "0.7.3", optional = true }
182182
static-iref = "3.0"
183183
tempfile = "=3.15.0"

sdk/src/utils/thumbnail.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ impl fmt::Display for ThumbnailFormat {
9999
/// * `builder.thumbnail.ignore_errors`
100100
///
101101
/// Read [make_thumbnail_from_stream] for more information.
102-
#[cfg_attr(feature = "v1_api", allow(dead_code))]
103-
#[cfg(feature = "file_io")]
102+
#[cfg(all(feature = "file_io", feature = "add_thumbnails", feature = "v1_api"))]
104103
pub fn make_thumbnail_bytes_from_path(
105104
path: &std::path::Path,
106105
) -> Result<Option<(ThumbnailFormat, Vec<u8>)>> {
@@ -488,7 +487,7 @@ pub mod tests {
488487
}
489488

490489
#[test]
491-
#[cfg(feature = "file_io")]
490+
#[cfg(all(feature = "file_io", feature = "v1_api", feature = "add_thumbnails"))]
492491
fn test_make_thumbnail_bytes_from_path() {
493492
use std::path::Path;
494493

0 commit comments

Comments
 (0)