Skip to content

Commit

Permalink
add clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
desaikd committed Nov 2, 2023
1 parent 2ef8a91 commit 72b71fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions ion-schema/src/nfa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Nfa {
self.transitions
.get(&state_id)
.map(|s| s.to_owned())
.unwrap_or(HashSet::new())
.unwrap_or_default()
}
}

Expand Down Expand Up @@ -329,11 +329,7 @@ impl NfaBuilder {
min: usize,
max: usize,
) {
let end_states = self
.nfa
.transitions
.entry(start_id)
.or_insert_with(HashSet::new);
let end_states = self.nfa.transitions.entry(start_id).or_default();

end_states.insert(Transition {
destination: end_id,
Expand Down
2 changes: 1 addition & 1 deletion ion-schema/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ impl Resolver {
self.resolved_schema_cache
.insert(isl.id(), Arc::clone(&schema));
}
Some(isl_import) if matches!(isl_import, IslImport::Schema(_)) => {
Some(IslImport::Schema(_)) => {
self.resolved_schema_cache
.insert(isl.id(), Arc::clone(&schema));
}
Expand Down

0 comments on commit 72b71fb

Please sign in to comment.