Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
Signed-off-by: James Archer <[email protected]>
  • Loading branch information
JE-Archer committed Sep 4, 2024
1 parent 3049956 commit b12c5d4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tool/microkit/src/sdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,15 +951,16 @@ impl DomainSchedule {
));
}

let id = {
if !domain_ids.contains_key(&name.to_string()) {
domain_ids.insert(name.to_string(), next_domain_id);
let id = match domain_ids.get(name) {
Some(&id) => id,
None => {
let id = next_domain_id;
next_domain_id += 1;
domain_ids.insert(name.to_string(), id);
id
}
*domain_ids.get(&name.to_string()).unwrap()
};

domain_ids.insert(name.to_string(), id);
schedule.push(DomainTimeslice {
id,
length: length.unwrap(),
Expand Down

0 comments on commit b12c5d4

Please sign in to comment.