aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands/dap.rs
diff options
context:
space:
mode:
authorDaniel Sedlak2024-01-17 18:40:45 +0000
committerGitHub2024-01-17 18:40:45 +0000
commitaf8e524a7d06253fa854bf8954f64312e11d0ea0 (patch)
treed36deaffca3049d67d46aff35fb500644cb700df /helix-term/src/commands/dap.rs
parentc60ba4ba04de56f37f4f4b19051bc4a1e68b3484 (diff)
Address clippy lints (#9371)
Diffstat (limited to 'helix-term/src/commands/dap.rs')
-rw-r--r--helix-term/src/commands/dap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs
index e9fde476..dec25cbd 100644
--- a/helix-term/src/commands/dap.rs
+++ b/helix-term/src/commands/dap.rs
@@ -78,7 +78,7 @@ fn thread_picker(
})
.with_preview(move |editor, thread| {
let frames = editor.debugger.as_ref()?.stack_frames.get(&thread.id)?;
- let frame = frames.get(0)?;
+ let frame = frames.first()?;
let path = frame.source.as_ref()?.path.clone()?;
let pos = Some((
frame.line.saturating_sub(1),
@@ -166,7 +166,7 @@ pub fn dap_start_impl(
// TODO: avoid refetching all of this... pass a config in
let template = match name {
Some(name) => config.templates.iter().find(|t| t.name == name),
- None => config.templates.get(0),
+ None => config.templates.first(),
}
.ok_or_else(|| anyhow!("No debug config with given name"))?;