From f6a72b4e190fdd47fde7400a174aba1c95d4a1f9 Mon Sep 17 00:00:00 2001 From: Nahor Date: Wed, 1 Apr 2026 12:02:51 -0700 Subject: [PATCH] status: replace unreachable code with an `assert!` Part of #12603 --- src/builtins/status.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/builtins/status.rs b/src/builtins/status.rs index a43df9d84..a8f37510a 100644 --- a/src/builtins/status.rs +++ b/src/builtins/status.rs @@ -399,16 +399,9 @@ pub fn status(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> B let job_control_mode = match opts.new_job_control_mode { Some(j) => { // Flag form used - if !args.is_empty() { - streams.err.appendln(&wgettext_fmt!( - BUILTIN_ERR_ARG_COUNT2, - cmd, - c.to_wstr(), - 0, - args.len() - )); - return Err(STATUS_INVALID_ARGS); - } + // Any extra args would have already failed, either as an + // unrecognized subcmd, or as a "subcmd combo" + assert!(args.is_empty(), "unexpected job-control args"); j } None => {