mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Refactor FormControl trait
The trait is now implemented for HTMLFooElement instead of &HTMLFooElement and does no longer require an impl body.
This commit is contained in:
parent
a72d7a4f52
commit
bae4abd388
9 changed files with 24 additions and 54 deletions
|
@ -191,11 +191,7 @@ impl VirtualMethods for HTMLButtonElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FormControl<'a> for &'a HTMLButtonElement {
|
||||
fn to_element(self) -> &'a Element {
|
||||
ElementCast::from_ref(self)
|
||||
}
|
||||
}
|
||||
impl FormControl for HTMLButtonElement {}
|
||||
|
||||
impl<'a> Activatable for &'a HTMLButtonElement {
|
||||
fn as_element<'b>(&'b self) -> &'b Element {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue