Merge branch 'usize' into 'master'

Implement IntoAttributeValue for usize

See merge request !9
This commit is contained in:
lumi 2017-05-27 21:53:23 +00:00
commit 8f4361c8b1

View file

@ -87,6 +87,12 @@ pub trait IntoAttributeValue {
fn into_attribute_value(self) -> Option<String>; 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 { impl IntoAttributeValue for String {
fn into_attribute_value(self) -> Option<String> { fn into_attribute_value(self) -> Option<String> {
Some(self) Some(self)