From d63c7b991d6285ae7f9d4c4498ca6c6b3c8cfdff Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 27 May 2017 22:33:20 +0100 Subject: [PATCH] implement IntoAttributeValue for usize --- src/convert.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/convert.rs b/src/convert.rs index 3e3ed41..93631ad 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -87,6 +87,12 @@ pub trait IntoAttributeValue { fn into_attribute_value(self) -> Option; } +impl IntoAttributeValue for usize { + fn into_attribute_value(self) -> Option { + Some(format!("{}", self)) + } +} + impl IntoAttributeValue for String { fn into_attribute_value(self) -> Option { Some(self)