From 638866fa4c9a7d0bd863cb00690cea68407fbab4 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 27 May 2017 22:56:17 +0100 Subject: [PATCH] implement IntoAttributeValue for u32, u16 and u8 --- src/convert.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/convert.rs b/src/convert.rs index 93631ad8..980f68f7 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -93,6 +93,24 @@ impl IntoAttributeValue for usize { } } +impl IntoAttributeValue for u32 { + fn into_attribute_value(self) -> Option { + Some(format!("{}", self)) + } +} + +impl IntoAttributeValue for u16 { + fn into_attribute_value(self) -> Option { + Some(format!("{}", self)) + } +} + +impl IntoAttributeValue for u8 { + fn into_attribute_value(self) -> Option { + Some(format!("{}", self)) + } +} + impl IntoAttributeValue for String { fn into_attribute_value(self) -> Option { Some(self)