File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,11 @@ fn expand_manifest_(
59
59
anyhow:: bail!( "`package.{key}` is not allowed in embedded manifests" )
60
60
}
61
61
}
62
- let file_name = path
62
+ let bin_path = path
63
63
. file_name ( )
64
64
. ok_or_else ( || anyhow:: format_err!( "no file name" ) ) ?
65
- . to_string_lossy ( ) ;
65
+ . to_string_lossy ( )
66
+ . into_owned ( ) ;
66
67
let file_stem = path
67
68
. file_stem ( )
68
69
. ok_or_else ( || anyhow:: format_err!( "no file name" ) ) ?
@@ -96,10 +97,7 @@ fn expand_manifest_(
96
97
97
98
let mut bin = toml:: Table :: new ( ) ;
98
99
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) ) ;
103
101
manifest. insert (
104
102
"bin" . to_owned ( ) ,
105
103
toml:: Value :: Array ( vec ! [ toml:: Value :: Table ( bin) ] ) ,
You can’t perform that action at this time.
0 commit comments