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 2022/08/10 09:23:30 UTC
[avro] branch branch-1.11 updated: AVRO-3600: UnionSchema::new method should be public (#1817)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/branch-1.11 by this push:
new a3eea396e AVRO-3600: UnionSchema::new method should be public (#1817)
a3eea396e is described below
commit a3eea396ed93ac1752d8e42a1da9e31c48d0beb0
Author: Marko Milenković <mi...@users.noreply.github.com>
AuthorDate: Wed Aug 10 11:23:00 2022 +0200
AVRO-3600: UnionSchema::new method should be public (#1817)
* AVRO-3600: UnionSchema::new method should be public
UnionSchema::new method should be public to facility programmatic schema
creation. Visibility of the method changed.
* AVRO-3600: Add rustdoc to a method that has been promoted to be public
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
Co-authored-by: Martin Tzvetanov Grigorov <mg...@apache.org>
(cherry picked from commit ce2439d7a7669a5c7f2fa555c661770fbe67493a)
---
lang/rust/avro/src/schema.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index d8759fd7d..e96b16d66 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -629,7 +629,8 @@ pub struct UnionSchema {
}
impl UnionSchema {
- pub(crate) fn new(schemas: Vec<Schema>) -> AvroResult<Self> {
+ /// Creates a new UnionSchema from a vector of schemas.
+ pub fn new(schemas: Vec<Schema>) -> AvroResult<Self> {
let mut vindex = BTreeMap::new();
for (i, schema) in schemas.iter().enumerate() {
if let Schema::Union(_) = schema {