use similar_asserts::assert_eq; use instant_xml::{to_string, ToXml}; #[derive(ToXml)] #[xml(ns(bar = "BAR"))] struct NoPrefixAttrNs { #[xml(attribute, ns(bar))] flag: bool, } #[test] fn no_prefix_attr_ns() { assert_eq!( to_string(&NoPrefixAttrNs { flag: true }).unwrap(), "" ); }