implement Default traits

This commit is contained in:
yggverse 2025-01-12 14:08:30 +02:00
parent 1a0b31e695
commit 9b214b1469
55 changed files with 330 additions and 0 deletions

View file

@ -8,6 +8,12 @@ pub struct Counter {
pub widget: Rc<Widget>,
}
impl Default for Counter {
fn default() -> Self {
Self::new()
}
}
impl Counter {
// Construct
pub fn new() -> Self {

View file

@ -4,6 +4,12 @@ pub struct Widget {
pub label: Label,
}
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget {
// Construct
pub fn new() -> Self {

View file

@ -7,6 +7,12 @@ pub struct Widget {
pub clamp: Clamp,
}
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget {
// Construct
pub fn new() -> Self {