From d60f12ccbe3f68161b049388abbe81f32e19df20 Mon Sep 17 00:00:00 2001 From: Jordan Herzstein Date: Sat, 7 Dec 2024 10:45:59 -0500 Subject: [PATCH 1/4] cargo format --- cli/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index c71cff7e..af840ce3 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -796,7 +796,8 @@ fn sender_print_code( writeln!(term, "This is equivalent to the following link: \u{001B}]8;;{}\u{001B}\\{}\u{001B}]8;;\u{001B}\\", &uri, &uri)?; if qr { - let qr_code = qr2term::generate_qr_string(&uri).context("Failed to generate QR code for send link")?; + let qr_code = qr2term::generate_qr_string(&uri) + .context("Failed to generate QR code for send link")?; writeln!(term, "{}", qr_code)?; } else { writeln!(term, "QR option not enabled. Skipping QR code generation.")?; From b4c04e1a49fe73649a1113f2ce60daf86f2d8c05 Mon Sep 17 00:00:00 2001 From: Jordan Herzstein Date: Sat, 7 Dec 2024 10:54:54 -0500 Subject: [PATCH 2/4] cargo format --- cli/src/main.rs | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index af840ce3..47f398a3 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -292,7 +292,12 @@ async fn main() -> eyre::Result<()> { match app.command { WormholeCommand::Send { common, - common_leader: CommonLeaderArgs { code, code_length , qr }, + common_leader: + CommonLeaderArgs { + code, + code_length, + qr, + }, common_send: CommonSenderArgs { file_name, files }, .. } => { @@ -332,7 +337,12 @@ async fn main() -> eyre::Result<()> { tries, timeout, common, - common_leader: CommonLeaderArgs { code, code_length, qr }, + common_leader: + CommonLeaderArgs { + code, + code_length, + qr, + }, common_send: CommonSenderArgs { file_name, files }, .. } => { @@ -407,7 +417,12 @@ async fn main() -> eyre::Result<()> { WormholeCommand::Forward(ForwardCommand::Serve { targets, common, - common_leader: CommonLeaderArgs { code, code_length, qr }, + common_leader: + CommonLeaderArgs { + code, + code_length, + qr, + }, .. }) => { // TODO make fancy @@ -489,7 +504,9 @@ async fn main() -> eyre::Result<()> { let mut app_config = forwarding::APP_CONFIG; app_config.app_version.transit_abilities = parse_transit_args(&common); let (wormhole, _code, relay_hints) = - parse_and_connect(&mut term, common, code, None, false, false, app_config, None).await?; + parse_and_connect(&mut term, common, code, None, false, false, app_config, None, + ) + .await?; let offer = forwarding::connect( wormhole, @@ -555,7 +572,8 @@ fn parse_transit_args(args: &CommonArgs) -> transit::Abilities { } } -type PrintCodeFn = dyn Fn(&mut Term, &magic_wormhole::Code, &Option, bool) -> eyre::Result<()>; +type PrintCodeFn = + dyn Fn(&mut Term, &magic_wormhole::Code, &Option, bool) -> eyre::Result<()>; /** * Parse the necessary command line arguments to establish an initial server connection. From 6c9a2a3b81e3c2612bd332398828b3e030954456 Mon Sep 17 00:00:00 2001 From: Jordan Herzstein Date: Sat, 7 Dec 2024 10:57:32 -0500 Subject: [PATCH 3/4] cargo format --- cli/src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 47f398a3..9f00ea62 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -294,9 +294,9 @@ async fn main() -> eyre::Result<()> { common, common_leader: CommonLeaderArgs { - code, + code, code_length, - qr, + qr, }, common_send: CommonSenderArgs { file_name, files }, .. @@ -341,7 +341,7 @@ async fn main() -> eyre::Result<()> { CommonLeaderArgs { code, code_length, - qr, + qr, }, common_send: CommonSenderArgs { file_name, files }, .. @@ -419,9 +419,9 @@ async fn main() -> eyre::Result<()> { common, common_leader: CommonLeaderArgs { - code, - code_length, - qr, + code, + code_length, + qr, }, .. }) => { @@ -572,7 +572,7 @@ fn parse_transit_args(args: &CommonArgs) -> transit::Abilities { } } -type PrintCodeFn = +type PrintCodeFn = dyn Fn(&mut Term, &magic_wormhole::Code, &Option, bool) -> eyre::Result<()>; /** From 126bf19f1ca5c40a6db44237d0048034301bf96c Mon Sep 17 00:00:00 2001 From: Jordan Herzstein Date: Sat, 7 Dec 2024 11:00:33 -0500 Subject: [PATCH 4/4] cargo format --- cli/src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index 9f00ea62..4af3437d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -292,8 +292,8 @@ async fn main() -> eyre::Result<()> { match app.command { WormholeCommand::Send { common, - common_leader: - CommonLeaderArgs { + common_leader: + CommonLeaderArgs { code, code_length, qr, @@ -310,7 +310,7 @@ async fn main() -> eyre::Result<()> { common, code, Some(code_length), - qr, + qr, true, transfer::APP_CONFIG, Some(&sender_print_code), @@ -337,8 +337,8 @@ async fn main() -> eyre::Result<()> { tries, timeout, common, - common_leader: - CommonLeaderArgs { + common_leader: + CommonLeaderArgs { code, code_length, qr, @@ -417,8 +417,8 @@ async fn main() -> eyre::Result<()> { WormholeCommand::Forward(ForwardCommand::Serve { targets, common, - common_leader: - CommonLeaderArgs { + common_leader: + CommonLeaderArgs { code, code_length, qr, @@ -503,8 +503,8 @@ async fn main() -> eyre::Result<()> { tracing::warn!("This is an unstable feature. Make sure that your peer is running the exact same version of the program as you. Also, please report all bugs and crashes."); let mut app_config = forwarding::APP_CONFIG; app_config.app_version.transit_abilities = parse_transit_args(&common); - let (wormhole, _code, relay_hints) = - parse_and_connect(&mut term, common, code, None, false, false, app_config, None, + let (wormhole, _code, relay_hints) = parse_and_connect( + &mut term, common, code, None, false, false, app_config, None, ) .await?;