wip-serialize-api

This commit is contained in:
Dirkjan Ochtman 2022-09-05 15:55:59 +02:00
parent 2a8d729a3e
commit cbf78e8b46
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ pub fn from_str<'xml, T: FromXml<'xml>>(input: &'xml str) -> Result<T, Error> {
pub fn to_string(value: &(impl ToXml + ?Sized)) -> Result<String, Error> { pub fn to_string(value: &(impl ToXml + ?Sized)) -> Result<String, Error> {
let mut output = String::new(); let mut output = String::new();
value.serialize(&mut Serializer::new(&mut output))?; to_writer(value, &mut output)?;
Ok(output) Ok(output)
} }