Skip to content

Commit

Permalink
clippy complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascxstro committed Nov 10, 2024
1 parent e75a717 commit a9791c4
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions interp/src/flatten/structures/environment/program_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,23 @@ impl ControlPoint {
_ => {}
};
// At root, at end to process logic above.
if string_path == String::from("") {
string_path = string_path + ".";
if string_path == "" {

Check failure on line 99 in interp/src/flatten/structures/environment/program_counter.rs

View workflow job for this annotation

GitHub Actions / Check Formatting

comparison to empty slice
string_path += ".";
continue;
}
let control_type = if body {
body = false;
count = -1;
String::from("b")
} else if if_branches.contains_key(&control_idx) {
let (_, branch) =
if_branches.get_key_value(&control_idx).unwrap();
branch.clone()
} else {
if if_branches.contains_key(&control_idx) {
let (_, branch) =
if_branches.get_key_value(&control_idx).unwrap();
branch.clone()
} else {
count += 1;
count.to_string()
}
count += 1;
count.to_string()
};

string_path = string_path + "-" + &control_type;
}
string_path
Expand Down

0 comments on commit a9791c4

Please sign in to comment.