Skip to content

Commit 692954b

Browse files
jeff-hykinclaude
andcommitted
fix: resolve CI lint, formatting, and cargo-shear failures
- Remove unused `parking_lot` dependency (cargo-shear) - Add `[lints] workspace = true` to dimos/Cargo.toml (rerun lint) - Fix TOML formatting in dimos/pyproject.toml (taplo) - Rename error variables from `e` to `err` (rerun lint convention) - Fix trailing whitespace in keyboard.rs - Add blank lines before doc comments on struct fields/constants - Use Display instead of Debug for error formatting in viewer.rs - Commit updated Cargo.lock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 88eda7d commit 692954b

7 files changed

Lines changed: 37 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,12 +3110,11 @@ dependencies = [
31103110

31113111
[[package]]
31123112
name = "dimos-viewer"
3113-
version = "0.30.0-alpha.1+dev"
3113+
version = "0.30.0-alpha.4"
31143114
dependencies = [
31153115
"bincode",
31163116
"clap",
31173117
"mimalloc",
3118-
"parking_lot",
31193118
"rerun",
31203119
"serde",
31213120
"tokio",

dimos/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ rerun = { path = "../crates/top/rerun", default-features = false, features = [
2929
clap = { workspace = true, features = ["derive"] }
3030
bincode.workspace = true
3131
mimalloc.workspace = true
32-
parking_lot.workspace = true
3332
serde = { workspace = true, features = ["derive"] }
3433
tokio = { workspace = true, features = [
3534
"io-util",
@@ -40,3 +39,6 @@ tokio = { workspace = true, features = [
4039
"sync",
4140
"time",
4241
] }
42+
43+
[lints]
44+
workspace = true

dimos/pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ version = "0.30.0a4"
88
description = "Interactive Rerun viewer for DimOS with click-to-navigate support"
99
readme = "README.md"
1010
requires-python = ">=3.10"
11-
license = {text = "MIT OR Apache-2.0"}
12-
authors = [{name = "Dimensional Inc.", email = "engineering@dimensional.com"}]
11+
license = { text = "MIT OR Apache-2.0" }
12+
authors = [{ name = "Dimensional Inc.", email = "engineering@dimensional.com" }]
1313
classifiers = [
14-
"Development Status :: 4 - Beta",
15-
"Intended Audience :: Developers",
16-
"Topic :: Scientific/Engineering",
17-
"Topic :: Scientific/Engineering :: Visualization",
18-
"Programming Language :: Rust",
19-
"License :: OSI Approved :: MIT License",
20-
"License :: OSI Approved :: Apache Software License",
21-
"Operating System :: POSIX :: Linux",
22-
"Operating System :: MacOS",
14+
"Development Status :: 4 - Beta",
15+
"Intended Audience :: Developers",
16+
"Topic :: Scientific/Engineering",
17+
"Topic :: Scientific/Engineering :: Visualization",
18+
"Programming Language :: Rust",
19+
"License :: OSI Approved :: MIT License",
20+
"License :: OSI Approved :: Apache Software License",
21+
"Operating System :: POSIX :: Linux",
22+
"Operating System :: MacOS",
2323
]
2424

2525
[project.urls]

dimos/src/interaction/handle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ impl InteractionHandle {
3434
is_2d,
3535
};
3636

37-
if let Err(e) = self.tx.send(event) {
38-
eprintln!("Failed to send click event: {}", e);
37+
if let Err(err) = self.tx.send(event) {
38+
eprintln!("Failed to send click event: {}", err);
3939
}
4040
}
4141
}

dimos/src/interaction/keyboard.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Keyboard handler for WASD movement controls that publish Twist messages.
2-
//!
2+
//!
33
//! Converts keyboard input to robot velocity commands following teleop conventions:
44
//! - WASD/arrows for linear/angular motion
55
//! - QE for strafing
@@ -98,8 +98,8 @@ impl KeyboardHandler {
9898
// If not engaged, don't capture any keys
9999
if !self.engaged {
100100
if self.was_active {
101-
if let Err(e) = self.publish_stop() {
102-
re_log::warn!("Failed to send stop on disengage: {e:?}");
101+
if let Err(err) = self.publish_stop() {
102+
re_log::warn!("Failed to send stop on disengage: {err:?}");
103103
}
104104
self.was_active = false;
105105
}
@@ -112,8 +112,8 @@ impl KeyboardHandler {
112112
// Check for emergency stop (Space key pressed - one-shot action)
113113
if ctx.input(|i| i.key_pressed(egui::Key::Space)) {
114114
self.state.reset();
115-
if let Err(e) = self.publish_stop() {
116-
re_log::warn!("Failed to send emergency stop: {e:?}");
115+
if let Err(err) = self.publish_stop() {
116+
re_log::warn!("Failed to send emergency stop: {err:?}");
117117
}
118118
self.was_active = false;
119119
self.estop_flash = true;
@@ -122,13 +122,13 @@ impl KeyboardHandler {
122122

123123
// Publish twist command if keys are active, or stop if just released
124124
if self.state.any_active() {
125-
if let Err(e) = self.publish_twist() {
126-
re_log::warn!("Failed to publish twist command: {e:?}");
125+
if let Err(err) = self.publish_twist() {
126+
re_log::warn!("Failed to publish twist command: {err:?}");
127127
}
128128
self.was_active = true;
129129
} else if self.was_active {
130-
if let Err(e) = self.publish_stop() {
131-
re_log::warn!("Failed to send stop on key release: {e:?}");
130+
if let Err(err) = self.publish_stop() {
131+
re_log::warn!("Failed to send stop on key release: {err:?}");
132132
}
133133
self.was_active = false;
134134
}
@@ -188,8 +188,8 @@ impl KeyboardHandler {
188188
self.engaged = !self.engaged;
189189
if !self.engaged {
190190
// Send stop when disengaging
191-
if let Err(e) = self.publish_stop() {
192-
re_log::warn!("Failed to send stop on disengage: {e:?}");
191+
if let Err(err) = self.publish_stop() {
192+
re_log::warn!("Failed to send stop on disengage: {err:?}");
193193
}
194194
self.state.reset();
195195
self.was_active = false;
@@ -204,8 +204,8 @@ impl KeyboardHandler {
204204
&& ctx.input(|i| i.pointer.primary_clicked())
205205
{
206206
self.engaged = false;
207-
if let Err(e) = self.publish_stop() {
208-
re_log::warn!("Failed to send stop on outside click: {e:?}");
207+
if let Err(err) = self.publish_stop() {
208+
re_log::warn!("Failed to send stop on outside click: {err:?}");
209209
}
210210
self.state.reset();
211211
self.was_active = false;

dimos/src/interaction/lcm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ pub struct ClickEvent {
6161
pub x: f64,
6262
pub y: f64,
6363
pub z: f64,
64+
6465
/// Rerun entity path (stored in frame_id per our convention).
6566
pub entity_path: String,
67+
6668
/// Unix timestamp in seconds.
6769
pub timestamp_sec: i32,
70+
6871
/// Nanosecond remainder.
6972
pub timestamp_nsec: i32,
7073
}

dimos/src/viewer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ static GLOBAL: re_memory::AccountingAllocator<mimalloc::MiMalloc> =
1212

1313
/// LCM channel for click events (follows RViz convention)
1414
const LCM_CHANNEL: &str = "/clicked_point#geometry_msgs.PointStamped";
15+
1516
/// Minimum time between click events (debouncing)
1617
const CLICK_DEBOUNCE_MS: u64 = 100;
18+
1719
/// Maximum rapid clicks to log as warning
1820
const RAPID_CLICK_THRESHOLD: usize = 5;
21+
1922
/// Default gRPC listen port (9877 to avoid conflict with stock Rerun on 9876)
2023
const DEFAULT_PORT: u16 = 9877;
2124

@@ -231,7 +234,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
231234
);
232235
}
233236
Err(err) => {
234-
re_log::error!("Failed to publish LCM click event: {err:?}");
237+
re_log::error!("Failed to publish LCM click event: {err}");
235238
}
236239
}
237240
}

0 commit comments

Comments
 (0)