Skip to content

Commit

Permalink
Minor fixes in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten0 committed Nov 12, 2024
1 parent e77a9bb commit a150f1a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions serde_avro_fast/src/schema/self_referential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl TryFrom<super::safe::SchemaMut> for Schema {
// - We only use pointers from the point at which we call `as_mut_ptr` so the
// compiler will not have aliasing constraints.
// - We don't dereference the ~references (NodeRef) we create in key_to_ref
// until are nodes are initialized.
// until all nodes are initialized.

let new_node = match safe_node {
SafeSchemaNode {
Expand Down Expand Up @@ -419,9 +419,7 @@ impl TryFrom<super::safe::SchemaMut> for Schema {
for _ in 0..len {
// Safety:
// - UnionVariantsPerTypeLookup won't ever read `per_type_lookup` of the other
// nodes, so there are no aliasing issues. (Tbh I'm not even sure that would
// really be an issue because we'd have `& &mut` anyway but with that I'm sure
// there isn't an issue)
// nodes, so there are no aliasing issues.
unsafe {
match *curr_storage_node_ptr {
SchemaNode::Union(Union {
Expand Down

0 comments on commit a150f1a

Please sign in to comment.