Improve usability of predefined Money constructors

This commit is contained in:
Pro 2022-05-11 21:23:09 +02:00
parent 5dccdcbb28
commit 43d9d0a76b

View file

@ -77,7 +77,7 @@ pub struct Money {
macro_rules! impl_money {
($name:ident, $type:expr) => {
#[doc=concat!("Creates a instance of Money with the currency ", stringify!($type))]
pub fn $name(value: &str) -> Self {
pub fn $name(value: impl ToString) -> Self {
Self {
currency_code: $type,
value: value.to_string(),