implement IntoAttributeValue for usize

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-27 22:33:20 +01:00
parent ec31c2b4a3
commit d63c7b991d

View file

@ -87,6 +87,12 @@ pub trait IntoAttributeValue {
fn into_attribute_value(self) -> Option<String>;
}
impl IntoAttributeValue for usize {
fn into_attribute_value(self) -> Option<String> {
Some(format!("{}", self))
}
}
impl IntoAttributeValue for String {
fn into_attribute_value(self) -> Option<String> {
Some(self)