Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: further refactor of SyncSettings setup
Fintan Halpenny committed 6 months ago
commit b3462d724456c7d288c4a23b6be813d4b59897c1
parent ce5676f2eb88d2d81126a5abd765d4e6341d519d
1 file changed +5 -9
modified crates/radicle-cli/src/commands/seed.rs
@@ -22,19 +22,15 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {

    match args.rids {
        Some(rids) => {
+
            let settings = SyncSettings::default()
+
                .seeds(args.from)
+
                .timeout(timeout)
+
                .with_profile(&profile);
            for rid in rids {
                update(rid, scope, &mut node, &profile)?;

                if should_fetch && node.is_running() {
-
                    if let Err(e) = sync::fetch(
-
                        rid,
-
                        SyncSettings::default()
-
                            .seeds(args.from.clone())
-
                            .timeout(timeout)
-
                            .with_profile(&profile),
-
                        &mut node,
-
                        &profile,
-
                    ) {
+
                    if let Err(e) = sync::fetch(rid, settings.clone(), &mut node, &profile) {
                        term::error(e);
                    }
                }