Skip to content

Commit

Permalink
refactor(macros.rs): improve trait implmentation readability
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Apr 19, 2015
1 parent 31b476c commit e7f7735
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ macro_rules! simple_enum {
impl std::str::FromStr for $e {
type Err = String;

fn from_str(s: &str) -> Result<Self,<Self as std::str::FromStr>::Err> {
fn from_str(s: &str) -> Result<Self,Self::Err> {
match s {
$(stringify!($v) => Ok($e::$v),)+
_ => Err({
Expand Down Expand Up @@ -303,7 +303,7 @@ macro_rules! arg_enum {
impl std::str::FromStr for $e {
type Err = String;

fn from_str(s: &str) -> Result<Self,<Self as std::str::FromStr>::Err> {
fn from_str(s: &str) -> Result<Self,Self::Err> {
match s {
$(stringify!($v) => Ok($e::$v),)+
_ => Err({
Expand All @@ -324,7 +324,7 @@ macro_rules! arg_enum {
impl std::str::FromStr for $e {
type Err = String;

fn from_str(s: &str) -> Result<Self,<Self as std::str::FromStr>::Err> {
fn from_str(s: &str) -> Result<Self,Self::Err> {
match s {
$(stringify!($v) => Ok($e::$v),)+
_ => Err({
Expand All @@ -346,7 +346,7 @@ macro_rules! arg_enum {
impl std::str::FromStr for $e {
type Err = String;

fn from_str(s: &str) -> Result<Self,<Self as std::str::FromStr>::Err> {
fn from_str(s: &str) -> Result<Self,Self::Err> {
match s {
$(stringify!($v) => Ok($e::$v),)+
_ => Err({
Expand All @@ -368,7 +368,7 @@ macro_rules! arg_enum {
impl std::str::FromStr for $e {
type Err = String;

fn from_str(s: &str) -> Result<Self,<Self as std::str::FromStr>::Err> {
fn from_str(s: &str) -> Result<Self,Self::Err> {
match s {
$(stringify!($v) => Ok($e::$v),)+
_ => Err({
Expand All @@ -381,4 +381,4 @@ macro_rules! arg_enum {
}
}
};
}
}

0 comments on commit e7f7735

Please sign in to comment.