Skip to content

Fix cargo warnings - #619

Open
0xbrayo wants to merge 1 commit into
ActivityWatch:masterfrom
0xbrayo:fix-cargo-warnings
Open

Fix cargo warnings#619
0xbrayo wants to merge 1 commit into
ActivityWatch:masterfrom
0xbrayo:fix-cargo-warnings

Conversation

@0xbrayo

@0xbrayo 0xbrayo commented Jun 13, 2026

Copy link
Copy Markdown
Member

No description provided.

@0xbrayo
0xbrayo marked this pull request as draft June 13, 2026 12:29
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.76%. Comparing base (656f3c9) to head (d8b0826).
⚠️ Report is 75 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #619      +/-   ##
==========================================
+ Coverage   70.81%   75.76%   +4.94%     
==========================================
  Files          51       62      +11     
  Lines        2916     5030    +2114     
==========================================
+ Hits         2065     3811    +1746     
- Misses        851     1219     +368     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR suppresses cargo dead_code warnings across several crates by adding #[allow(dead_code)] attributes to unused public items, and removes the close() method from the AccessMethod trait since it was never called through the trait interface.

  • Trait cleanup (accessmethod.rs): close() is removed from the AccessMethod trait and both Datastore and AwClient impls. The two remaining close() calls in sync.rs target concrete Datastore instances directly (not trait objects), so compilation is unaffected and the cleanup is correct.
  • #[allow(dead_code)] suppressions: Applied to enum variants (LegacyDatastoreImportError, TryParse::Unparsed), struct fields (Expr::span, SyncSpec::start), and public functions (PrivacyFilterEngine::with_defaults, to_json, get_server_config_path, get_server_port). These items appear to be intentionally preserved API surface or planned-but-unimplemented functionality.

Confidence Score: 5/5

Safe to merge — all changes are additive lint suppressions or the removal of a trait method that was never invoked through the trait.

The only structural change (dropping close() from AccessMethod) is verified safe: every call site in sync.rs operates on a concrete Datastore type, not a trait object, so Datastore::close() remains reachable and the trait removal introduces no regression. The #[allow(dead_code)] annotations silence legitimate compiler warnings without altering runtime behavior.

No files require special attention.

Important Files Changed

Filename Overview
aw-sync/src/accessmethod.rs Removes close() from the AccessMethod trait and its two implementations; safe because all call sites in sync.rs invoke Datastore::close() directly on concrete types, not through the trait.
aw-sync/src/sync.rs Adds #[allow(dead_code)] to SyncSpec::start; the start field is set only in Default::default() and never read, confirming it is unimplemented future filtering — no logic change.
aw-datastore/src/legacy_import.rs Suppresses dead_code on two error enum variants that are defined but never constructed; change is safe.
aw-datastore/src/privacy_filter.rs Suppresses dead_code on two public helper methods (with_defaults, to_json) that are part of the intended API but not currently called anywhere in the codebase.
aw-models/src/tryvec.rs Suppresses dead_code on the Unparsed(Value) enum variant; safe lint suppression.
aw-query/src/ast.rs Suppresses dead_code on the public Expr::span field; the span is populated during parsing but never read by the interpreter/evaluator.
aw-sync/src/dirs.rs Suppresses dead_code on get_server_config_path; this function is only called by get_server_port in util.rs, which is itself dead code.
aw-sync/src/util.rs Suppresses dead_code on get_server_port; the function is intact and correct, just not yet wired to any call site.

Reviews (2): Last reviewed commit: "fix: resolve cargo build warnings" | Re-trigger Greptile

Comment thread aw-datastore/src/datastore.rs Outdated
Comment thread aw-datastore/src/datastore.rs Outdated
Comment thread aw-datastore/src/compression.rs Outdated
@0xbrayo
0xbrayo force-pushed the fix-cargo-warnings branch from 3c5a5aa to f89b653 Compare July 19, 2026 13:15
@0xbrayo
0xbrayo force-pushed the fix-cargo-warnings branch from f89b653 to d8b0826 Compare July 19, 2026 13:18
@0xbrayo
0xbrayo marked this pull request as ready for review July 20, 2026 14:37
Sign up for free to 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