fix clippy errors
This commit is contained in:
parent
3d427713e1
commit
b77d331792
@ -42,7 +42,6 @@ pub enum Message {
|
|||||||
Synced(GetInfoResult, Arc<dyn Daemon + Sync + Send>),
|
Synced(GetInfoResult, Arc<dyn Daemon + Sync + Send>),
|
||||||
Started(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
Started(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
||||||
Loaded(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
Loaded(Result<Arc<dyn Daemon + Sync + Send>, Error>),
|
||||||
DaemonStarted(EmbeddedDaemon),
|
|
||||||
Failure(DaemonError),
|
Failure(DaemonError),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -69,8 +69,8 @@ pub struct GUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
Installer(Installer),
|
Installer(Box<Installer>),
|
||||||
Loader(Loader),
|
Loader(Box<Loader>),
|
||||||
App(App),
|
App(App),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ impl Application for GUI {
|
|||||||
let (install, command) = Installer::new(config_path, network);
|
let (install, command) = Installer::new(config_path, network);
|
||||||
(
|
(
|
||||||
Self {
|
Self {
|
||||||
state: State::Installer(install),
|
state: State::Installer(Box::new(install)),
|
||||||
},
|
},
|
||||||
Command::batch(vec![
|
Command::batch(vec![
|
||||||
command.map(|msg| Message::Install(Box::new(msg))),
|
command.map(|msg| Message::Install(Box::new(msg))),
|
||||||
@ -123,7 +123,7 @@ impl Application for GUI {
|
|||||||
let (loader, command) = Loader::new(cfg, daemon_cfg);
|
let (loader, command) = Loader::new(cfg, daemon_cfg);
|
||||||
(
|
(
|
||||||
Self {
|
Self {
|
||||||
state: State::Loader(loader),
|
state: State::Loader(Box::new(loader)),
|
||||||
},
|
},
|
||||||
Command::batch(vec![
|
Command::batch(vec![
|
||||||
command.map(|msg| Message::Load(Box::new(msg))),
|
command.map(|msg| Message::Load(Box::new(msg))),
|
||||||
@ -154,7 +154,7 @@ impl Application for GUI {
|
|||||||
let daemon_cfg =
|
let daemon_cfg =
|
||||||
DaemonConfig::from_file(Some(cfg.minisafed_config_path.clone())).unwrap();
|
DaemonConfig::from_file(Some(cfg.minisafed_config_path.clone())).unwrap();
|
||||||
let (loader, command) = Loader::new(cfg, daemon_cfg);
|
let (loader, command) = Loader::new(cfg, daemon_cfg);
|
||||||
self.state = State::Loader(loader);
|
self.state = State::Loader(Box::new(loader));
|
||||||
command.map(|msg| Message::Load(Box::new(msg)))
|
command.map(|msg| Message::Load(Box::new(msg)))
|
||||||
} else {
|
} else {
|
||||||
i.update(*msg).map(|msg| Message::Install(Box::new(msg)))
|
i.update(*msg).map(|msg| Message::Install(Box::new(msg)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user