File tree 2 files changed +5
-7
lines changed 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -84,16 +84,15 @@ impl GuestView {
84
84
} )
85
85
. collect ( ) ;
86
86
87
- // The filename and command line are set to null-terminated strings
88
87
let filename = ctx
89
88
. filename
90
- . clone ( )
91
- . map_or_else ( || " \0 ". to_string ( ) , |s| format ! ( "{}\0 " , s) ) ;
89
+ . as_ref ( )
90
+ . map_or_else ( || c"<unknown> ". to_string ( ) , |s| format ! ( c "{}", s) ) ;
92
91
93
92
let cmd = ctx
94
93
. binary
95
- . clone ( )
96
- . map_or_else ( || " \0 ". to_string ( ) , |s| format ! ( "{}\0 " , s) ) ;
94
+ . as_ref ( )
95
+ . map_or_else ( || c"<unknown> ". to_string ( ) , |s| format ! ( c "{}", s) ) ;
97
96
98
97
// The xsave state is checked as it can be empty
99
98
let mut components = vec ! [ ] ;
Original file line number Diff line number Diff line change @@ -149,8 +149,7 @@ impl UninitializedSandbox {
149
149
GuestBinary :: FilePath ( binary_path) => {
150
150
let path = Path :: new ( & binary_path)
151
151
. canonicalize ( )
152
- . map_err ( |e| new_error ! ( "GuestBinary not found: '{}': {}" , binary_path, e) ) ?;
153
- let path = path
152
+ . map_err ( |e| new_error ! ( "GuestBinary not found: '{}': {}" , binary_path, e) ) ?
154
153
. into_os_string ( )
155
154
. into_string ( )
156
155
. map_err ( |e| new_error ! ( "Error converting OsString to String: {:?}" , e) ) ?;
You can’t perform that action at this time.
0 commit comments