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 ce2439d7a AVRO-3600: UnionSchema::new method should be public (#1817)
ce2439d7a is described below
commit ce2439d7a7669a5c7f2fa555c661770fbe67493a
Author: Marko Milenković <[email protected]>
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 <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
---
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 {