diff --git a/crates/xilem_html/src/element/elements.rs b/crates/xilem_html/src/element/elements.rs
index ff2af42ba..4675cc9db 100644
--- a/crates/xilem_html/src/element/elements.rs
+++ b/crates/xilem_html/src/element/elements.rs
@@ -53,10 +53,7 @@ macro_rules! element {
self
}
- pub fn remove_attr(
- &mut self,
- name: impl Into>,
- ) -> &mut Self {
+ pub fn remove_attr(&mut self, name: &str) -> &mut Self {
self.0.remove_attr(name);
self
}
diff --git a/crates/xilem_html/src/element/mod.rs b/crates/xilem_html/src/element/mod.rs
index 49ac93370..d3dca3d6f 100644
--- a/crates/xilem_html/src/element/mod.rs
+++ b/crates/xilem_html/src/element/mod.rs
@@ -92,12 +92,12 @@ impl Element {
if let Some(value) = value.into_attribute_value() {
self.attributes.insert(name, value);
} else {
- self.attributes.remove(&name);
+ self.remove_attr(&name);
}
}
- pub fn remove_attr(&mut self, name: impl Into) {
- self.attributes.remove(&name.into());
+ pub fn remove_attr(&mut self, name: &str) {
+ self.attributes.remove(name);
}
/// Set a function to run after the new view tree has been created.