macOS: terminal-launch Clippy fails on unnecessary tail return

Open Beginner friendly
#1,294 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
90/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start with crates/jcode-terminal-launch/src/lib.rs:269–273 in detected_resume_terminal_with_client_env and run the provided scripts/dev_cargo.sh clippy command on macOS. Check the platform-specific match and preserve its arms, cfg boundaries, and non-macOS behavior while making the package-level lint check pass without suppressing warnings.

Written by the indexing model from the issue text.

Description

area: ci autonomous: no bug platform: macos triage: needs-decision

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.

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.

Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 1jehuang/jcode

All issues in 1jehuang/jcode

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.