diff --git a/ion-schema/Cargo.toml b/ion-schema/Cargo.toml index ff6d461..b294da7 100644 --- a/ion-schema/Cargo.toml +++ b/ion-schema/Cargo.toml @@ -16,7 +16,7 @@ exclude = [ "**/ion-schema-schemas/isl/**", "*.pdf" ] -version = "0.9.1" +version = "0.10.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ion-schema/src/nfa.rs b/ion-schema/src/nfa.rs index a5b8039..f206077 100644 --- a/ion-schema/src/nfa.rs +++ b/ion-schema/src/nfa.rs @@ -91,7 +91,7 @@ impl Nfa { self.transitions .get(&state_id) .map(|s| s.to_owned()) - .unwrap_or(HashSet::new()) + .unwrap_or_default() } } @@ -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, diff --git a/ion-schema/src/system.rs b/ion-schema/src/system.rs index ff8857b..ea3268f 100644 --- a/ion-schema/src/system.rs +++ b/ion-schema/src/system.rs @@ -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)); }