1 2 3 4 5 6 7 8 9 10 11 12 13 14
use xml::attribute::OwnedAttribute; pub fn is_false(v: &str) -> bool { v == "0" || v == "false" } pub fn read_bool(attrs: &[OwnedAttribute]) -> bool { if let Some(v) = attrs.get(0) { if is_false(&v.value) { return false; } } true }