Skip to content

Commit

Permalink
Update cargo_metadata version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Dec 19, 2024
1 parent 4554381 commit 44cd3a2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 21 deletions.
63 changes: 48 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ clap = { version = "3.2", features = ["derive"] }
log = "0.4"
env_logger = "0.9.0"
colored = "2.0.0"
cargo_metadata = "0.15.0"
cargo_metadata = "0.19"
humansize = "1.1.1"
semver = "1.0.12"
tempfile = "3.3.0"
Expand Down
10 changes: 5 additions & 5 deletions src/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::get_default_target;
use cargo_metadata::{Artifact, Message, MessageIter};
use cargo_metadata::{Artifact, Message, MessageIter, TargetKind};
use std::collections::HashMap;
use std::fmt::Write as WriteFmt;
use std::io::{BufReader, Write};
Expand Down Expand Up @@ -290,14 +290,14 @@ fn write_metadata_message<W: Write>(mut stream: W, message: Message) {
/// Returns a user-friendly name of an artifact kind.
pub fn get_artifact_kind(artifact: &Artifact) -> &str {
for kind in &artifact.target.kind {
match kind.as_str() {
"bin" => {
match kind {
TargetKind::Bin => {
return "binary";
}
"bench" => {
TargetKind::Bench => {
return "benchmark";
}
"example" => {
TargetKind::Example => {
return "example";
}
_ => {}
Expand Down

0 comments on commit 44cd3a2

Please sign in to comment.