summaryrefslogtreecommitdiffstats
path: root/pure
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-04-01 00:41:33 +0700
committerLibravatar GitHub <noreply@github.com>2022-04-01 00:41:33 +0700
commit3042fa2cb63c651ebed2abe6f4054e61f70b0331 (patch)
tree1eb11153a041a139e966f1d76daaa875c8381bfe /pure
parent662c76488bc242457ae6a3da9748fbac23647b19 (diff)
parent9b835c2662ce3143726f249c761418bac39c443b (diff)
downloadiced-3042fa2cb63c651ebed2abe6f4054e61f70b0331.tar.gz
iced-3042fa2cb63c651ebed2abe6f4054e61f70b0331.tar.bz2
iced-3042fa2cb63c651ebed2abe6f4054e61f70b0331.zip
Merge pull request #1298 from 0x192/master
Implement `Default` for `pure::State`
Diffstat (limited to '')
-rw-r--r--pure/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/pure/src/lib.rs b/pure/src/lib.rs
index 71d20a4d..f9f0ae2d 100644
--- a/pure/src/lib.rs
+++ b/pure/src/lib.rs
@@ -41,6 +41,12 @@ pub struct State {
state_tree: widget::Tree,
}
+impl Default for State {
+ fn default() -> Self {
+ Self::new()
+ }
+}
+
impl State {
pub fn new() -> Self {
Self {