Repository navigation
fix(desktop): remove a needless return that fails clippy on Linux - #2640
Merged
hidb4ai merged 1 commit intoNov 14, 2026
Merged
Conversation
On Linux, resolve_local_data_dir ends with a cfg(target_os = "linux") block whose only statement is `return resolve_local_data_dir_from(...);`, because the other block is compiled out. Clippy reports it as needless_return, and desktop-validation runs clippy with -D warnings, so the Linux build has stopped there since oceanbase#2471. The block now evaluates to the call, which returns the same value.
Fengzdadi
requested review from
AlexStocks,
PsiACE and
frostming
as code owners
November 14, 2026 00:26
hidb4ai
approved these changes
Nov 14, 2026
hidb4ai
left a comment
Contributor
There was a problem hiding this comment.
Reviewed d6ab408. No actionable findings. Removing the redundant return and semicolon preserves the cfg-selected return value and fixes the Linux Clippy failure without suppressing the lint. No database tables or interfaces are added or changed. Verified the corresponding Linux CI Clippy/test execution and successful Windows and both macOS checks; local Rust 1.95.0 formatting and diff checks also pass. Merge confidence: 98/100.
hireview001
approved these changes
Nov 14, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
No issue. This PR repairs the
desktop-validation / linuxcheck, which fails onmaster.Rationale for this change
#2471 added
resolve_local_data_dirtodesktop/src-tauri/src/ops_bridge.rs. Its body has two blocks: one for Linux and one for every other platform. On Linux the other block is compiled out, so the Linux block's only statement,return resolve_local_data_dir_from(...);, is the last statement of the function. Clippy reports it asneedless_return. The job runscargo clippy --locked --all-targets -- -D warnings, so the Linux build stops there:macOS and Windows compile the other block and pass. #2471's own
desktop-validation / linuxrun failed the same way. Every pull request that selects the Desktop checks now fails on Linux, for example #2636.What changes are included in this PR?
The Linux block now evaluates to the call instead of returning it, as clippy suggests. The function returns the same value on every platform. No other code changes.
Are there any user-facing changes?
No.
How was this change tested?
rustfmt --edition 2024 --checkon the changed file.-D warnings:return, clippy reports the sameneedless_returnerror.local_data, as on macOS and Windows.desktop-validation / linuxjob. It is also the first Linux run of the Linux-only tests that feat(desktop): add Linux systemd --user service integration #2471 added inops_bridge/tests.rs: feat(desktop): add Linux systemd --user service integration #2471's Linux job stopped at clippy and never reachedcargo test.returnkeyword and its semicolon. The call and its arguments are unchanged.fixture_dirinops_bridge/tests.rs, thereturnis under#[cfg(target_os = "macos")]and passes clippy on the macOS jobs, so it is left as it is.AI usage statement
Claude Code (Claude Opus 5.5) found the failure in the CI logs, made the change, ran the checks above, and wrote this description.