quick-xml
quick-xml copied to clipboard
enum text content is (incorrectly) indented
#[derive(Clone, Debug, Serialize, PartialEq)]
#[serde(rename = "response")]
pub struct Response {
#[serde(rename = "intent", with = "quick_xml::serde_helpers::text_content")]
pub intent: Intent,
}
#[derive(Clone, Debug, Serialize, PartialEq)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum Intent {
Accept,
Reject,
}
results in
<response>
<intent>
ACCEPT
</intent>
</response>
when indentation is enabled. In my understanding it's incorrect that the element content (intent
) contains whitespace.
Yes, I think, this is undesired behavior and we need to fix it