File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,15 @@ impl GuestView {
100100 } )
101101 . collect ( ) ;
102102
103- // The filename and command line are set to null-terminated strings
104103 let filename = ctx
105104 . filename
106- . clone ( )
107- . map_or_else ( || "\0 " . to_string ( ) , |s| format ! ( "{} \0 " , s ) ) ;
105+ . as_ref ( )
106+ . map_or_else ( || "<unknown> " . to_string ( ) , |s| s . to_string ( ) ) ;
108107
109108 let cmd = ctx
110109 . binary
111- . clone ( )
112- . map_or_else ( || "\0 " . to_string ( ) , |s| format ! ( "{} \0 " , s ) ) ;
110+ . as_ref ( )
111+ . map_or_else ( || "<unknown> " . to_string ( ) , |s| s . to_string ( ) ) ;
113112
114113 // The xsave state is checked as it can be empty
115114 let mut components = vec ! [ ] ;
Original file line number Diff line number Diff line change @@ -160,8 +160,7 @@ impl UninitializedSandbox {
160160 GuestBinary :: FilePath ( binary_path) => {
161161 let path = Path :: new ( & binary_path)
162162 . canonicalize ( )
163- . map_err ( |e| new_error ! ( "GuestBinary not found: '{}': {}" , binary_path, e) ) ?;
164- let path = path
163+ . map_err ( |e| new_error ! ( "GuestBinary not found: '{}': {}" , binary_path, e) ) ?
165164 . into_os_string ( )
166165 . into_string ( )
167166 . map_err ( |e| new_error ! ( "Error converting OsString to String: {:?}" , e) ) ?;
You can’t perform that action at this time.
0 commit comments