Skip to content

chore: remove dead load_token utility - #337

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-load-token-utility-f33b02
Open

chore: remove dead load_token utility#337
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-load-token-utility-f33b02

Conversation

@detail-app

@detail-appdetail-appBot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Remove the unused load_token() helper from src/config/storage.rs
along with its dedicated load_token_errors_when_absent test. Two
remaining tests that verified via load_token now check through
load_config() instead, preserving coverage of store_token and
clear_credentials.

load_token had zero production callers: its only consumer
(lib.rs::create_client) was inlined in PR #219 ("refactor: remove
--api-url CLI flag") which read api_token directly from the loaded
config. The function was a left-over utility superseded by that
inlined logic. Test-only references inside storage.rs were its sole
remaining users.

History


Dead Code PRs can be configured here.


Open in Devin Review

Summary by cubic

Remove the unused load_token() helper and update tests to read tokens via load_config(). This eliminates dead code without changing runtime behavior.

  • load_token() had no production callers; token reads use load_config().api_token.
  • Tests updated: store_and_load_token -> store_token_roundtrip; removed load_token_errors_when_absent; remaining assertions check api_token via load_config.
  • No migration required.

Written for commit 017beb5. Summary will update on new commits.

Review in cubic

@aviator-app

aviator-appBot commented Aug 22, 2026

Copy link
Copy Markdown

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR is not ready to merge (currently in state pending): this PR has not been approved.

Pending Status Checks

  • ✅ 7 tests passing!

See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@devin-ai-integrationdevin-ai-integrationBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@sachiniyer