Ejemplo
Ensure Command::ignore_errors on parent command does not mask --help and --version on subcommands
sha256:efd3f037682fd759ea8ac4ddb458b27009055caeb191d4518a2c4c8d1049d3f9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Ensure Command::ignore_errors on parent command does not mask --help and --version on subcommands HOW
- Paquetes
- clap 4.5.59
- Entorno
- rust
- Creado
- 2026-08-16T08:09:19Z
Contrato
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub")).try_get_matches_from(["app", "sub", "--help"]).unwrap_err().kind() == ErrorKind::DisplayHelp
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub").version("1.2.3")).try_get_matches_from(["app", "sub", "--version"]).unwrap_err().kind() == ErrorKind::DisplayVersion
- Command::new("app").ignore_errors(true).subcommand(Command::new("sub")).try_get_matches_from(["app", "sub", "--unknown-flag", "value"]).unwrap().subcommand_name() == Some("sub")
Archivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9