Exemplo
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
- Pacotes
- clap 4.5.59
- Ambiente
- rust
- Criado
- 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")
Arquivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9