From d4cf9e3466c40ae74a8099eb4b7b59474ccf2936 Mon Sep 17 00:00:00 2001 From: edouard Date: Wed, 30 Aug 2023 18:50:22 +0200 Subject: [PATCH] fix: move structs next to their methods --- gui/src/installer/step/bitcoind.rs | 48 +++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gui/src/installer/step/bitcoind.rs b/gui/src/installer/step/bitcoind.rs index 5fcacdf4..fac66db0 100644 --- a/gui/src/installer/step/bitcoind.rs +++ b/gui/src/installer/step/bitcoind.rs @@ -133,30 +133,6 @@ fn download_url() -> String { ) } -pub struct DefineBitcoind { - cookie_path: form::Value, - address: form::Value, - is_running: Option>, -} - -pub struct InternalBitcoindStep { - liana_datadir: PathBuf, - bitcoind_datadir: PathBuf, - network: Network, - started: Option>, - exe_path: Option, - bitcoind_config: Option, - exe_config: Option, - internal_bitcoind_config: Option, - error: Option, - exe_download: Option, - install_state: Option, -} - -pub struct SelectBitcoindTypeStep { - use_external: bool, -} - /// Default prune value used by internal bitcoind. pub const PRUNE_DEFAULT: u32 = 15_000; /// Default ports used by bitcoind across all networks. @@ -511,6 +487,10 @@ pub fn port_is_valid(port: &u16) -> bool { !BITCOIND_DEFAULT_PORTS.contains(port) } +pub struct SelectBitcoindTypeStep { + use_external: bool, +} + impl Default for SelectBitcoindTypeStep { fn default() -> Self { Self::new() @@ -560,6 +540,12 @@ impl Step for SelectBitcoindTypeStep { } } +pub struct DefineBitcoind { + cookie_path: form::Value, + address: form::Value, + is_running: Option>, +} + impl DefineBitcoind { pub fn new() -> Self { Self { @@ -682,6 +668,20 @@ impl From for Box { } } +pub struct InternalBitcoindStep { + liana_datadir: PathBuf, + bitcoind_datadir: PathBuf, + network: Network, + started: Option>, + exe_path: Option, + bitcoind_config: Option, + exe_config: Option, + internal_bitcoind_config: Option, + error: Option, + exe_download: Option, + install_state: Option, +} + impl From for Box { fn from(s: InternalBitcoindStep) -> Box { Box::new(s)