aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornc <[email protected]>2020-08-08 17:47:08 +0100
committernc <[email protected]>2020-08-08 17:47:08 +0100
commit62158c5f142a1838b030c0583c9467a3cb46358b (patch)
treeb5688546d04b9aa7de3ec014ec4333b167c179aa /src
parent92b4ecd7006f68f87dff3130b85c00dddacead85 (diff)
use call_on_name which works and is simpler
Diffstat (limited to 'src')
-rw-r--r--src/main.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 1d9efb4..14ddf03 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -62,11 +62,6 @@ fn main() {
62 s.set_theme(theme::theme_gen()); 62 s.set_theme(theme::theme_gen());
63 s.run(); 63 s.run();
64 64
65 let app = std::rc::Rc::try_unwrap(s.find_name::<NamedView<App>>("Main").unwrap() 65 s.call_on_name("Main", |app: &mut App| app.save_state());
66 .get_mut()
67 .into_owner()
68 .into_owner()).ok().unwrap().into_inner();
69 app.save_state();
70
71 } 66 }
72} 67}