-
-
Notifications
You must be signed in to change notification settings - Fork 34
[Cleanup] Clean up warnings and unused code #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes incorrect logical negation operations in state initialization across multiple configuration pages and updates dependencies. The main issue was that state variables intended to represent "disabled" or "enabled" states were incorrectly negating boolean values, which was further compounded by the nullish coalescing operator precedence.
Key changes:
- Fixed boolean logic in state initialization for 11+ configuration pages by removing incorrect negation operators
- Updated the
meshtasticdependency from a Git reference to published version 0.1.7 - Added explicit lifetime annotations to improve Rust code clarity
- Removed unused code including helper functions, error variants, and imports
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TelemetryConfigPage.tsx | Removed incorrect negation operators from airQualityDisabled and envMeasurementDisabled state initialization |
| StoreAndForwardConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| SerialModuleConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| RemoteHardwareConfigPage.tsx | Updated commented-out code to reflect correct boolean logic |
| RangeTestConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| MQTTConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| ExternalNotificationConfigPage.tsx | Fixed three state initializations: moduleDisabled, bellAlertsDisabled, and messageAlertsDisabled |
| CannedMessageConfigPage.tsx | Fixed moduleDisabled state initialization logic |
| AudioConfigPage.tsx | Removed incorrect negation and extra parentheses from codec2Disabled state initialization |
| PositionConfigPage.tsx | Fixed gpsDisabled and fixedPositionDisabled state initialization logic |
| NetworkConfigPage.tsx | Removed incorrect negation and extra parentheses from wifiDisabled and ethDisabled |
| LoRaConfigPage.tsx | Changed from negation to double negation for proper boolean coercion and removed unnecessary fallback |
| BluetoothConfigPage.tsx | Fixed bluetoothDisabled initialization and removed unnecessary fallback from fixedPinDisabled |
| packet_api/mod.rs | Added explicit lifetime annotations to get_locked_graph method |
| packet_api/handlers/mod.rs | Removed unused NotificationDispatchFailure error variant and its Display implementation |
| packet_api/handlers/mesh_packet/handlers.rs | Changed to Copy semantics, updated from deprecated from_i32 to try_from, removed unused notification code |
| lib.rs | Removed unused TypeScript export function and related imports |
| ipc/commands/radio.rs | Removed unused imports (events and trace) |
| domains/mesh.rs | Removed unused imports |
| device/mod.rs | Updated from deprecated from_i32 to try_from for enum conversions |
| device/helpers.rs | Removed unused helper functions get_node_user_name and get_channel_name |
| api/primitives/radio.rs | Removed unused imports |
| Cargo.toml | Updated meshtastic dependency from Git reference to published version 0.1.7 with reordered features |
| Cargo.lock | Updated dependency tree reflecting the new meshtastic version and its transitive dependencies including new specta versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e7c6f8c to
79c2b55
Compare
matthewCmatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Fun to see you picking the project back up!
| use tauri::Manager; | ||
| use tauri_plugin_log::{fern::colors::ColoredLevelConfig, Target, TargetKind}; | ||
|
|
||
| fn export_ts_types(file_path: &str) -> Result<(), TsExportError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does the following:
meshtasticcrate from0.1.6to0.1.7pnpm run ui:devpnpm run rust:dev