Skip to content

Commit a867af7

Browse files
committed
chore: aggregate PRs
This PR aggregates changes from the following PRs: - Closes #12628 by @\Doryu001 - Closes #12648 by @\ANtutov - Closes #12656 by @\Bilogweb3
1 parent bd69999 commit a867af7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

crates/common/src/provider/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,10 @@ fn resolve_path(path: &Path) -> Result<PathBuf, ()> {
356356

357357
#[cfg(windows)]
358358
fn 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
}

crates/common/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

crates/verify/src/provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)