Merge branch 'u32-u16-u8' into 'master'

Implement IntoAttributeValue for u32, u16 and u8

See merge request !10
This commit is contained in:
lumi 2017-05-27 22:00:54 +00:00
commit 28d17381c6

View file

@ -93,6 +93,24 @@ impl IntoAttributeValue for usize {
}
}
impl IntoAttributeValue for u32 {
fn into_attribute_value(self) -> Option<String> {
Some(format!("{}", self))
}
}
impl IntoAttributeValue for u16 {
fn into_attribute_value(self) -> Option<String> {
Some(format!("{}", self))
}
}
impl IntoAttributeValue for u8 {
fn into_attribute_value(self) -> Option<String> {
Some(format!("{}", self))
}
}
impl IntoAttributeValue for String {
fn into_attribute_value(self) -> Option<String> {
Some(self)