You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2023/03/09 07:29:25 UTC
[avro] branch master updated: AVRO-3723: [Rust] Make schema::ResolvedSchema and schema::Names public. (#2131)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 6886dcec0 AVRO-3723: [Rust] Make schema::ResolvedSchema and schema::Names public. (#2131)
6886dcec0 is described below
commit 6886dcec0d0bfceb160ac9b3a57bf1111c591c0a
Author: David Lacalle Castillo <41...@users.noreply.github.com>
AuthorDate: Thu Mar 9 08:29:20 2023 +0100
AVRO-3723: [Rust] Make schema::ResolvedSchema and schema::Names public. (#2131)
---
lang/rust/avro/src/schema.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index d94146ce3..3842afd97 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -244,7 +244,7 @@ pub type Aliases = Option<Vec<Alias>>;
/// Represents Schema lookup within a schema env
pub(crate) type Names = HashMap<Name, Schema>;
/// Represents Schema lookup within a schema
-pub(crate) type NamesRef<'a> = HashMap<Name, &'a Schema>;
+pub type NamesRef<'a> = HashMap<Name, &'a Schema>;
/// Represents the namespace for Named Schema
pub type Namespace = Option<String>;
@@ -396,7 +396,7 @@ impl Serialize for Alias {
}
}
-pub(crate) struct ResolvedSchema<'s> {
+pub struct ResolvedSchema<'s> {
names_ref: NamesRef<'s>,
root_schema: &'s Schema,
}
@@ -416,10 +416,10 @@ impl<'s> TryFrom<&'s Schema> for ResolvedSchema<'s> {
}
impl<'s> ResolvedSchema<'s> {
- pub(crate) fn get_root_schema(&self) -> &'s Schema {
+ pub fn get_root_schema(&self) -> &'s Schema {
self.root_schema
}
- pub(crate) fn get_names(&self) -> &NamesRef<'s> {
+ pub fn get_names(&self) -> &NamesRef<'s> {
&self.names_ref
}