Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: make the panic message *even* nicer
✗ CI failure Fintan Halpenny committed 6 months ago
commit 9a2e62c0407aee02f03f0feb92164ed554b5ed9c
parent 7c6b7a94247ed724c54eb6835e9f1e250496502a
2 failed (2 total) View logs
1 file changed +4 -1
modified crates/radicle-cli/src/commands/id/args.rs
@@ -51,7 +51,10 @@ pub(super) fn parse_many_upserts(
    // so we can chunk the aggregated slice exactly.
    let chunks = values.chunks_exact(3);

-
    assert!(chunks.remainder().is_empty());
+
    assert!(
+
        chunks.remainder().is_empty(),
+
        "Expected `--payload` values to appear in triples, this may indicate a bug in `clap`"
+
    );

    chunks.map(|chunk| {
        // Slice accesses will not panic, guaranteed by `chunks_exact(3)`.