Skip to content

Commit

Permalink
fix gear-wasm-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
StackOverflowExcept1on committed Dec 16, 2024
1 parent d67b957 commit b54e2d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/wasm-builder/src/crate_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use crate::{builder_error::BuilderError, multiple_crate_versions};
use anyhow::{Context, Result, ensure};
use cargo_metadata::{Metadata, MetadataCommand, Package};
use cargo_metadata::{CrateType, Metadata, MetadataCommand, Package};
use std::{collections::BTreeMap, path::Path};

/// Helper to get a crate info extracted from the `Cargo.toml`.
Expand Down Expand Up @@ -100,7 +100,7 @@ impl CrateInfo {
// is the "compiler recommended" style of library.
//
// see also https://doc.rust-lang.org/reference/linkage.html
let validated_lib = |ty: &String| ty == "lib" || ty == "rlib";
let validated_lib = |ty: &CrateType| matches!(ty, CrateType::Lib | CrateType::RLib);
let pkg_snake_case_name = pkg.name.replace('-', "_");

// Check for rustc version. See https://github.com/rust-lang/cargo/pull/12783
Expand Down

0 comments on commit b54e2d5

Please sign in to comment.