#1294·jcode

macOS: terminal-launch Clippy fails on unnecessary tail return

Author: ianalitisCreated Sep 18, 2026Updated Sep 18, 2026

Summary

On macOS, the terminal-launch library fails Clippy with warnings denied because the final platform-specific match uses an unnecessary return.

Reproduction

Revision: 5cb7b3dad6029a6f868e36fd4c13cbd07d1fca50 on upstream master. Environment: macOS, Apple Silicon, Rust 1.94.1.

bash
scripts/dev_cargo.sh clippy --offline --locked -p jcode-terminal-launch --lib -- -D warnings

Actual: exit 101, clippy::needless_return at crates/jcode-terminal-launch/src/lib.rs:269–273, in detected_resume_terminal_with_client_env.

Expected: this package-level lint check succeeds without suppressing warnings.

Proposed fix

Make the macOS match the block's tail expression by removing return and its trailing semicolon. Keep the match arms, cfg boundaries, and non-macOS behavior unchanged. This is a behavior-preserving lint correction, not a reported terminal-launch runtime failure.

A bounded search for needless_return terminal found no existing focused open fix. PR #1293 records the same lint as an unrelated upstream baseline blocker, but does not change this code.