Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions avm-transpiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() {

// Parse original (pre-transpile) contract.
let contract_json = fs::read_to_string(Path::new(in_contract_artifact_path))
.expect(&format!("Unable to read file: {in_contract_artifact_path}"));
.unwrap_or_else(|_| panic!("Unable to read file: {in_contract_artifact_path}"));
let raw_json_obj: serde_json::Value =
serde_json::from_str(&contract_json).expect(&json_parse_error);

Expand All @@ -44,7 +44,7 @@ fn main() {
Path::new(out_transpiled_artifact_path),
Path::new(&(out_transpiled_artifact_path.clone() + ".bak")),
)
.expect(&format!("Unable to backup file: {out_transpiled_artifact_path}"));
.unwrap_or_else(|_| panic!("Unable to backup file: {out_transpiled_artifact_path}"));
}

// Parse json into contract object
Expand Down
2 changes: 1 addition & 1 deletion avm-transpiler/src/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ fn handle_storage_write(
inputs: &Vec<ValueOrArray>,
) {
assert!(inputs.len() == 2);
assert!(destinations.len() == 0);
assert!(destinations.is_empty());

let slot_offset_maybe = inputs[0];
let slot_offset = match slot_offset_maybe {
Expand Down