[ 
https://issues.apache.org/jira/browse/ARROW-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424942#comment-16424942
 ] 

ASF GitHub Bot commented on ARROW-2384:
---------------------------------------

sadikovi commented on a change in pull request #1818: ARROW-2384: [Rust] 
Additional test & Trait standardization
URL: https://github.com/apache/arrow/pull/1818#discussion_r179018956
 
 

 ##########
 File path: rust/src/datatypes.rs
 ##########
 @@ -75,10 +79,15 @@ impl Schema {
             .enumerate()
             .find(|&(_, c)| c.name == name)
     }
+}
 
-    pub fn to_string(&self) -> String {
-        let s: Vec<String> = self.columns.iter().map(|c| 
c.to_string()).collect();
-        s.join(",")
+impl fmt::Display for Schema {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.write_str(&self.columns
+            .iter()
+            .map(|c| c.to_string())
+            .collect::<Vec<String>>()
+            .join(", "))
 
 Review comment:
   Looks good, I suggest you keep your version.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Rust: Use Traits rather than defining methods directly
> ------------------------------------------------------
>
>                 Key: ARROW-2384
>                 URL: https://issues.apache.org/jira/browse/ARROW-2384
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust
>            Reporter: Maximilian Roos
>            Assignee: Maximilian Roos
>            Priority: Trivial
>              Labels: pull-request-available
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to