Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adevday authored Jun 14, 2023
1 parent 016b8f4 commit 89c2c12
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lang/rust/avro/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ impl<'s> ResolvedSchema<'s> {
&self.names_ref
}

pub fn to_resolved(&self) -> AvroResult<Schema> {
Self::to_resolved_internal(self.root_schema, &self.names_ref, &None)
pub fn to_resolved(&self, schema: &'s Schema) -> AvroResult<Schema> {
Self::to_resolved_internal(schema, &self.names_ref, &None)
}

fn to_resolved_internal(
Expand Down Expand Up @@ -477,6 +477,7 @@ impl<'s> ResolvedSchema<'s> {
aliases,
doc,
lookup,
attributes,
} => {
let fully_qualified_name = name.fully_qualified_name(enclosing_namespace);
let mut resolved = Vec::new();
Expand All @@ -493,6 +494,8 @@ impl<'s> ResolvedSchema<'s> {
default: field.default.clone(),
order: field.order.clone(),
position: field.position.clone(),
aliases: field.aliases.clone(),
custom_attributes: field.custom_attributes.clone(),
});
}
Ok(Schema::Record {
Expand All @@ -501,6 +504,7 @@ impl<'s> ResolvedSchema<'s> {
aliases: aliases.clone(),
doc: doc.clone(),
lookup: lookup.clone(),
attributes: attributes.clone(),
})
}
Schema::Ref { name } => {
Expand Down

0 comments on commit 89c2c12

Please sign in to comment.