mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
implement Default traits
This commit is contained in:
parent
1a0b31e695
commit
9b214b1469
55 changed files with 330 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue