changeset 89:898876834564

Rename trait to respect CamelCase conventions.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 22 Jun 2016 23:10:21 +0100
parents 5923cd4bfc36
children 4e62a8927dcc
files src/ast_dump.rs
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ast_dump.rs
+++ b/src/ast_dump.rs
@@ -2,7 +2,7 @@ use python_ast::{Module, stmt, expr, boo
 
 use std::iter;
 
-trait to_string_able {
+trait ToStringable {
     fn to_string(&self) -> String;
 }
 
@@ -63,7 +63,7 @@ impl cmpop {
     }
 }
 
-impl to_string_able for withitem {
+impl ToStringable for withitem {
     fn to_string(&self) -> String {
         match self.optional_vars {
             None => format!("{}", self.context_expr.to_string()),
@@ -72,7 +72,7 @@ impl to_string_able for withitem {
     }
 }
 
-fn vec_to_strings_vec<T: to_string_able>(values: Vec<T>) -> Vec<String> {
+fn vec_to_strings_vec<T: ToStringable>(values: Vec<T>) -> Vec<String> {
     let mut vector = vec!();
     for value in values {
         vector.push(value.to_string());
@@ -80,7 +80,7 @@ fn vec_to_strings_vec<T: to_string_able>
     vector
 }
 
-impl to_string_able for keyword {
+impl ToStringable for keyword {
     fn to_string(&self) -> String {
         match self.arg.clone() {
             Some(arg) => format!("{}={}", arg, self.value.to_string()),
@@ -106,7 +106,7 @@ fn if_else_statements_to_string(indent: 
     }
 }
 
-impl to_string_able for comprehension {
+impl ToStringable for comprehension {
     fn to_string(&self) -> String {
         let mut result = vec!();
         result.push(format!("for {} in {}", self.target.to_string(), self.iter.to_string()));
@@ -117,7 +117,7 @@ impl to_string_able for comprehension {
     }
 }
 
-impl to_string_able for slice {
+impl ToStringable for slice {
     fn to_string(&self) -> String {
         match *self {
             slice::Index(ref value) => value.to_string(),
@@ -166,7 +166,7 @@ impl excepthandler {
     }
 }
 
-impl to_string_able for expr {
+impl ToStringable for expr {
     fn to_string(&self) -> String {
         match self.clone() {
             expr::BoolOp(op, values) => {
@@ -242,7 +242,7 @@ impl to_string_able for expr {
     }
 }
 
-impl to_string_able for arg {
+impl ToStringable for arg {
     fn to_string(&self) -> String {
         match self.annotation {
             None => self.arg.clone(),
@@ -251,7 +251,7 @@ impl to_string_able for arg {
     }
 }
 
-impl to_string_able for arguments {
+impl ToStringable for arguments {
     fn to_string(&self) -> String {
         let mut args = vec!();
         let num_args = self.args.len();