File: fix-deps.diff

package info (click to toggle)
rust-cargo-binutils 0.3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 312 kB
  • sloc: makefile: 11
file content (60 lines) | stat: -rw-r--r-- 2,120 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Index: cargo-binutils/Cargo.toml
===================================================================
--- cargo-binutils.orig/Cargo.toml
+++ cargo-binutils/Cargo.toml
@@ -25,7 +25,7 @@ repository = "https://github.com/rust-em
 version = "1.0"
 
 [dependencies.cargo_metadata]
-version = "0.11"
+version = "0.14"
 
 [dependencies.clap]
 version = "2.33"
@@ -40,7 +40,7 @@ version = "0.4"
 version = "0.1"
 
 [dependencies.rustc_version]
-version = "0.2"
+version = "0.4"
 
 [dependencies.serde]
 version = "1.0"
Index: cargo-binutils/src/lib.rs
===================================================================
--- cargo-binutils.orig/src/lib.rs
+++ cargo-binutils/src/lib.rs
@@ -1,11 +1,12 @@
 #![deny(warnings)]
 
 use std::io::{self, BufReader, Write};
-use std::path::{Component, Path};
+use std::path::Path;
 use std::process::{Command, Stdio};
 use std::{env, str};
 
 use anyhow::{bail, Result};
+use cargo_metadata::camino::Utf8Component;
 use cargo_metadata::{Artifact, CargoOpt, Message, Metadata, MetadataCommand};
 use clap::{App, AppSettings, Arg, ArgMatches};
 use rustc_cfg::Cfg;
@@ -56,8 +57,8 @@ impl Context {
 
         // Should always succeed.
         let target_path = artifact.filenames[0].strip_prefix(metadata.target_directory)?;
-        let target_name = if let Some(Component::Normal(path)) = target_path.components().next() {
-            let path = path.to_string_lossy();
+        let target_name = if let Some(Utf8Component::Normal(path)) = target_path.components().next()
+        {
             // TODO: How will custom profiles impact this?
             if path == "debug" || path == "release" {
                 // Looks like this artifact was built for the host.
@@ -82,7 +83,7 @@ impl Context {
         let mut config_target_name = None;
         let config: toml::Value;
 
-        if let Some(path) = search(&metadata.workspace_root, ".cargo/config") {
+        if let Some(path) = search(metadata.workspace_root.as_std_path(), ".cargo/config") {
             config = parse(&path.join(".cargo/config"))?;
             config_target_name = config
                 .get("build")