Skip to content

Commit

Permalink
Fixes no_std compile by avoiding to_string (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
paupino committed Mar 26, 2022
1 parent 13735d6 commit 0971386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ macro_rules! impl_try_from_decimal {

#[inline]
fn try_from(t: Decimal) -> Result<Self, Error> {
$conversion_fn(&t).ok_or_else(|| Error::ConversionTo(stringify!($TInto).to_string()))
$conversion_fn(&t).ok_or_else(|| Error::ConversionTo(stringify!($TInto).into()))
}
}
};
Expand Down Expand Up @@ -1761,7 +1761,7 @@ macro_rules! impl_try_from_primitive {

#[inline]
fn try_from(t: $TFrom) -> Result<Self, Error> {
$conversion_fn(t).ok_or_else(|| Error::ConversionTo("Decimal".to_string()))
$conversion_fn(t).ok_or_else(|| Error::ConversionTo("Decimal".into()))
}
}
};
Expand Down

0 comments on commit 0971386

Please sign in to comment.