mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Merge branch 'usize' into 'master'
Implement IntoAttributeValue for usize See merge request !9
This commit is contained in:
commit
8f4361c8b1
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue