In these simple cases to_string() is recommended and likely
performs better as the formatter is not called.
for attribute in transform {
js.set_string(
attribute.attribute_type.to_string().as_str(),
- format!("{}", attribute.attribute_value.to_string()).as_str(),
+ attribute.attribute_value.to_string().as_str(),
)?;
if let Some(numeric_value) = attribute.numeric_value {
None => "<empty>".to_owned(),
};
let realm = match tx.realm {
- Some(ref x) => format!("{}", x.0),
+ Some(ref x) => x.0.to_string(),
None => "<empty>".to_owned(),
};
let sname = match tx.sname {