martin-g commented on a change in pull request #1602:
URL: https://github.com/apache/avro/pull/1602#discussion_r826623196



##########
File path: lang/rust/avro/src/schema.rs
##########
@@ -271,44 +275,51 @@ impl Name {
             _ => None,
         };
 
-        let aliases: Option<Vec<String>> = complex
-            .get("aliases")
-            .and_then(|aliases| aliases.as_array())
-            .and_then(|aliases| {
-                aliases
-                    .iter()
-                    .map(|alias| alias.as_str())
-                    .map(|alias| alias.map(|a| a.to_string()))
-                    .collect::<Option<_>>()
-            });
-
         Ok(Name {
             name: type_name.unwrap_or(name),
             namespace: namespace_from_name.or_else(|| 
complex.string("namespace")),
-            aliases,
         })
     }
 
     /// Return the `fullname` of this `Name`
     ///
     /// More information about fullnames can be found in the
     /// [Avro 
specification](https://avro.apache.org/docs/current/spec.html#names)
-    pub fn fullname(&self, default_namespace: Option<&str>) -> String {
+    pub fn fullname(&self, default_namespace: Namespace) -> String {
         if self.name.contains('.') {

Review comment:
       Good point!
   I haven't tried it but it should be possible to prevent manual construction 
by making the struct and/or its fields (crate) private.
   The users should use only pub methods/constructors/getters from the `impl`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to