From 43d9d0a76bcb343a12c02cf883ae2cd6ac0733c7 Mon Sep 17 00:00:00 2001 From: Pro Date: Wed, 11 May 2022 21:23:09 +0200 Subject: [PATCH] Improve usability of predefined Money constructors --- src/data/common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/common.rs b/src/data/common.rs index 50fa6d2..bcda40d 100644 --- a/src/data/common.rs +++ b/src/data/common.rs @@ -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(),