diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs
index a53d30e700b..4f4e7fc1c13 100644
--- a/components/script/dom/htmlhrelement.rs
+++ b/components/script/dom/htmlhrelement.rs
@@ -66,13 +66,13 @@ impl HTMLHRElementMethods for HTMLHRElement {
}
pub trait HTMLHRLayoutHelpers {
- fn get_color(&self) -> Option;
- fn get_width(&self) -> LengthOrPercentageOrAuto;
+ fn get_color(self) -> Option;
+ fn get_width(self) -> LengthOrPercentageOrAuto;
}
impl HTMLHRLayoutHelpers for LayoutDom<'_, HTMLHRElement> {
#[allow(unsafe_code)]
- fn get_color(&self) -> Option {
+ fn get_color(self) -> Option {
unsafe {
(&*self.upcast::().unsafe_get())
.get_attr_for_layout(&ns!(), &local_name!("color"))
@@ -82,7 +82,7 @@ impl HTMLHRLayoutHelpers for LayoutDom<'_, HTMLHRElement> {
}
#[allow(unsafe_code)]
- fn get_width(&self) -> LengthOrPercentageOrAuto {
+ fn get_width(self) -> LengthOrPercentageOrAuto {
unsafe {
(&*self.upcast::().unsafe_get())
.get_attr_for_layout(&ns!(), &local_name!("width"))