File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -356,10 +356,10 @@ fn resolve_path(path: &Path) -> Result<PathBuf, ()> {
356356
357357#[ cfg( windows) ]
358358fn resolve_path ( path : & Path ) -> Result < PathBuf , ( ) > {
359- if let Some ( s) = path. to_str ( ) {
360- if s. starts_with ( r"\\.\pipe\" ) {
361- return Ok ( path . to_path_buf ( ) ) ;
362- }
359+ if let Some ( s) = path. to_str ( )
360+ && s. starts_with ( r"\\.\pipe\" )
361+ {
362+ return Ok ( path . to_path_buf ( ) ) ;
363363 }
364364 Err ( ( ) )
365365}
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ pub fn strip_bytecode_placeholders(bytecode: &BytecodeObject) -> Option<Bytes> {
8282 match & bytecode {
8383 BytecodeObject :: Bytecode ( bytes) => Some ( bytes. clone ( ) ) ,
8484 BytecodeObject :: Unlinked ( s) => {
85- // Replace all __$xxx$__ placeholders with 32 zero bytes
86- let s = ( * BYTECODE_PLACEHOLDER_RE ) . replace_all ( s, "00" . repeat ( 40 ) ) ;
85+ // Replace all __$xxx$__ placeholders with 20 zero bytes (40 hex chars)
86+ let s = ( * BYTECODE_PLACEHOLDER_RE ) . replace_all ( s, "00" . repeat ( 20 ) ) ;
8787 let bytes = hex:: decode ( s. as_bytes ( ) ) ;
8888 Some ( bytes. ok ( ) ?. into ( ) )
8989 }
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl VerificationContext {
8181 . find ( & self . target_path , & self . target_name )
8282 . ok_or_eyre ( "failed to find target artifact when compiling for metadata" ) ?;
8383
84- artifact. metadata . clone ( ) . ok_or_eyre ( "target artifact does not have an ABI " )
84+ artifact. metadata . clone ( ) . ok_or_eyre ( "target artifact does not have metadata " )
8585 }
8686
8787 /// Returns [Vec] containing imports of the target file.
You can’t perform that action at this time.
0 commit comments