# HG changeset patch # User Emmanuel Gil Peyrot # Date 1466633421 -3600 # Node ID 898876834564e9640301cc0f523af94c6308a36d # Parent 5923cd4bfc366de0cbb1c456d74920125d2c4787 Rename trait to respect CamelCase conventions. diff --git a/src/ast_dump.rs b/src/ast_dump.rs --- 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(values: Vec) -> Vec { +fn vec_to_strings_vec(values: Vec) -> Vec { let mut vector = vec!(); for value in values { vector.push(value.to_string()); @@ -80,7 +80,7 @@ fn vec_to_strings_vec 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();