Add comprehensive async migration plan for transport and debugger crates #366
clippy
7 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 7 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.93.0-beta.5 (72b6488ba 2025-12-21)
- cargo 1.93.0-beta.5 (083ac5135 2025-12-15)
- clippy 0.1.93 (72b6488ba4 2025-12-21)
Annotations
Check warning on line 237 in crates/gui/src/main.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> crates/gui/src/main.rs:237:17
|
195 | / let debugger = match request.as_str() {
196 | | "attach" => {
197 | | let launch_arguments = AttachArguments {
198 | | working_directory: debug_root_dir.to_owned().to_path_buf(),
... |
235 | | _ => todo!(),
236 | | };
| |__________________- unnecessary `let` binding
237 | debugger
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
195 ~
196 ~ match request.as_str() {
197 + "attach" => {
198 + let launch_arguments = AttachArguments {
199 + working_directory: debug_root_dir.to_owned().to_path_buf(),
200 + port: connect.map(|c| c.port),
201 + language: debugger::Language::DebugPy,
202 + path_mappings,
203 + };
204 +
205 + tracing::debug!(?launch_arguments, "generated launch configuration");
206 +
207 + Debugger::new(launch_arguments).context("creating internal debugger")?
208 + }
209 + "launch" => {
210 + let Some(program) = program else {
211 + eyre::bail!("'program' is a required setting");
212 + };
213 + let launch_arguments = LaunchArguments {
214 + program: program.clone(),
215 + working_directory: Some(debug_root_dir.to_owned().to_path_buf()),
216 + language: debugger::Language::DebugPy,
217 + };
218 +
219 + tracing::debug!(?launch_arguments, "generated launch configuration");
220 + let debugger = debugger::Debugger::new(launch_arguments)
221 + .context("creating internal debugger")?;
222 +
223 + for line in args.breakpoints {
224 + let breakpoint = debugger::Breakpoint {
225 + path: program.clone(),
226 + line,
227 + ..Default::default()
228 + };
229 + debugger
230 + .add_breakpoint(&breakpoint)
231 + .context("adding breakpoint")?;
232 + }
233 +
234 + debugger
235 + }
236 + _ => todo!(),
237 + }
|
Check warning on line 221 in crates/gui2/src/lib.rs
github-actions / clippy
dereferencing a struct pattern where every field's pattern takes a reference
warning: dereferencing a struct pattern where every field's pattern takes a reference
--> crates/gui2/src/lib.rs:216:13
|
216 | / &AppState::Paused {
217 | | ref content,
218 | | ref breakpoints,
219 | | ref scrollable_id,
220 | | ..
221 | | } => CodeViewer::new(
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
216 ~ AppState::Paused {
217 ~ content,
218 ~ breakpoints,
219 ~ scrollable_id,
|
Check warning on line 36 in crates/gui/src/ui/call_stack.rs
github-actions / clippy
this `if` statement can be collapsed
warning: this `if` statement can be collapsed
--> crates/gui/src/ui/call_stack.rs:32:17
|
32 | / if ui.link(frame.name.to_string()).clicked() {
33 | | if let Err(e) = self.state.change_scope(frame.id) {
34 | | tracing::warn!(error = ?e, "error changing scope");
35 | | }
36 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
32 ~ if ui.link(frame.name.to_string()).clicked()
33 ~ && let Err(e) = self.state.change_scope(frame.id) {
34 | tracing::warn!(error = ?e, "error changing scope");
35 ~ }
|
Check warning on line 148 in crates/gui2/src/lib.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> crates/gui2/src/lib.rs:148:17
|
133 | / let debugger = match request.as_str() {
134 | | "attach" => {
135 | | let launch_arguments = AttachArguments {
136 | | working_directory: debug_root_dir.to_owned().to_path_buf(),
... |
146 | | _ => todo!(),
147 | | };
| |__________________- unnecessary `let` binding
148 | debugger
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
133 ~
134 ~ match request.as_str() {
135 + "attach" => {
136 + let launch_arguments = AttachArguments {
137 + working_directory: debug_root_dir.to_owned().to_path_buf(),
138 + port: connect.map(|c| c.port),
139 + language: debugger::Language::DebugPy,
140 + path_mappings,
141 + };
142 +
143 + tracing::debug!(?launch_arguments, "generated launch configuration");
144 +
145 + Debugger::new(launch_arguments).context("creating internal debugger")?
146 + }
147 + _ => todo!(),
148 + }
|
Check warning on line 143 in crates/gui2/src/code_view/mod.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/gui2/src/code_view/mod.rs:138:21
|
138 | / return Some((self.on_change)(CodeViewerAction::ScrollCommand {
139 | | offset: scrollable::AbsoluteOffset {
140 | | x: 0.0,
141 | | y: state.scroll_position,
142 | | },
143 | | }));
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
138 ~ Some((self.on_change)(CodeViewerAction::ScrollCommand {
139 + offset: scrollable::AbsoluteOffset {
140 + x: 0.0,
141 + y: state.scroll_position,
142 + },
143 ~ }))
|
Check warning on line 5 in crates/gui2/src/highlight.rs
github-actions / clippy
struct `Highlighter` is never constructed
warning: struct `Highlighter` is never constructed
--> crates/gui2/src/highlight.rs:5:19
|
5 | pub(crate) struct Highlighter {
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
Check warning on line 401 in crates/pythondap/src/debugger.rs
github-actions / clippy
returning the result of a `let` binding from a block
warning: returning the result of a `let` binding from a block
--> crates/pythondap/src/debugger.rs:401:17
|
370 | / let debugger = match request.as_str() {
371 | | "attach" => {
372 | | let launch_arguments = AttachArguments {
373 | | working_directory: debug_root_dir.to_owned().to_path_buf(),
... |
399 | | other => todo!("Configuration type: '{other}' not implemented yet, or invalid"),
400 | | };
| |__________________- unnecessary `let` binding
401 | debugger
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
370 ~
371 ~ match request.as_str() {
372 + "attach" => {
373 + let launch_arguments = AttachArguments {
374 + working_directory: debug_root_dir.to_owned().to_path_buf(),
375 + port: connect.map(|c| c.port),
376 + language: debugger::Language::DebugPy,
377 + path_mappings,
378 + };
379 +
380 + tracing::debug!(?launch_arguments, "generated launch configuration");
381 +
382 + debugger::Debugger::on_port(port, launch_arguments).map_err(|e| {
383 + PyRuntimeError::new_err(format!("creating internal debugger: {e}"))
384 + })?
385 + }
386 + "launch" => {
387 + let launch_arguments = LaunchArguments {
388 + program: program.ok_or_else(|| {
389 + PyRuntimeError::new_err("program is a required argument")
390 + })?,
391 + working_directory: Some(debug_root_dir.to_owned().to_path_buf()),
392 + language: debugger::Language::DebugPy,
393 + };
394 +
395 + tracing::debug!(?launch_arguments, "generated launch configuration");
396 + debugger::Debugger::on_port(port, launch_arguments).map_err(|e| {
397 + PyRuntimeError::new_err(format!("creating internal debugger: {e}"))
398 + })?
399 + }
400 + other => todo!("Configuration type: '{other}' not implemented yet, or invalid"),
401 + }
|