Skip to content

Commit 4638ef9

Browse files
committed
refactor(embedded): Clarify a variable name
1 parent 6e90f0e commit 4638ef9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ fn expand_manifest_(
5959
anyhow::bail!("`package.{key}` is not allowed in embedded manifests")
6060
}
6161
}
62-
let file_name = path
62+
let bin_path = path
6363
.file_name()
6464
.ok_or_else(|| anyhow::format_err!("no file name"))?
65-
.to_string_lossy();
65+
.to_string_lossy()
66+
.into_owned();
6667
let file_stem = path
6768
.file_stem()
6869
.ok_or_else(|| anyhow::format_err!("no file name"))?
@@ -96,10 +97,7 @@ fn expand_manifest_(
9697

9798
let mut bin = toml::Table::new();
9899
bin.insert("name".to_owned(), toml::Value::String(bin_name));
99-
bin.insert(
100-
"path".to_owned(),
101-
toml::Value::String(file_name.into_owned()),
102-
);
100+
bin.insert("path".to_owned(), toml::Value::String(bin_path));
103101
manifest.insert(
104102
"bin".to_owned(),
105103
toml::Value::Array(vec![toml::Value::Table(bin)]),

0 commit comments

Comments
 (0)