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/21 19:35:40 UTC

[avro] branch master updated: fix documentation of functions and variables (#2157)

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 c3d6a2fb5 fix documentation of functions and variables (#2157)
c3d6a2fb5 is described below

commit c3d6a2fb5d033dec93722c96caf4a205828b470e
Author: Igor Izvekov <iz...@mail.ru>
AuthorDate: Tue Mar 21 22:35:34 2023 +0300

    fix documentation of functions and variables (#2157)
---
 lang/rust/avro/src/reader.rs |  6 +++---
 lang/rust/avro/src/schema.rs | 16 +++++++---------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lang/rust/avro/src/reader.rs b/lang/rust/avro/src/reader.rs
index 3489ccfb1..bdd318861 100644
--- a/lang/rust/avro/src/reader.rs
+++ b/lang/rust/avro/src/reader.rs
@@ -34,14 +34,14 @@ use std::{
     str::FromStr,
 };
 
-// Internal Block reader.
+/// Internal Block reader.
 #[derive(Debug, Clone)]
 struct Block<'r, R> {
     reader: R,
-    // Internal buffering to reduce allocation.
+    /// Internal buffering to reduce allocation.
     buf: Vec<u8>,
     buf_idx: usize,
-    // Number of elements expected to exist within this block.
+    /// Number of elements expected to exist within this block.
     message_count: usize,
     marker: [u8; 16],
     codec: Codec,
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index 0aa0eed2c..07f2ac3ac 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -152,10 +152,8 @@ pub enum Schema {
     TimestampMicros,
     /// An amount of time defined by a number of months, days and milliseconds.
     Duration,
-    // A reference to another schema.
-    Ref {
-        name: Name,
-    },
+    /// A reference to another schema.
+    Ref { name: Name },
 }
 
 impl PartialEq for Schema {
@@ -759,13 +757,13 @@ fn parse_json_integer_for_decimal(value: &serde_json::Number) -> Result<DecimalM
 #[derive(Default)]
 struct Parser {
     input_schemas: HashMap<Name, Value>,
-    // A map of name -> Schema::Ref
-    // Used to resolve cyclic references, i.e. when a
-    // field's type is a reference to its record's type
+    /// A map of name -> Schema::Ref
+    /// Used to resolve cyclic references, i.e. when a
+    /// field's type is a reference to its record's type
     resolving_schemas: Names,
     input_order: Vec<Name>,
-    // A map of name -> fully parsed Schema
-    // Used to avoid parsing the same schema twice
+    /// A map of name -> fully parsed Schema
+    /// Used to avoid parsing the same schema twice
     parsed_schemas: Names,
 }