mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-09-11 16:07:00 +03:00
Resolve clippy lints (#3307)
This commit is contained in:
parent
5d33dbacac
commit
afd292e3b9
@ -5,6 +5,7 @@
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::cmp;
|
||||
use std::fmt::Write;
|
||||
|
||||
use super::Increment;
|
||||
use crate::{Range, Tendril};
|
||||
@ -162,7 +163,7 @@ fn new(fmt: &'static str) -> Self {
|
||||
fields.push(field);
|
||||
max_len += field.max_len + remaining[..i].len();
|
||||
regex += &remaining[..i];
|
||||
regex += &format!("({})", field.regex);
|
||||
write!(regex, "({})", field.regex).unwrap();
|
||||
remaining = &after[spec_len..];
|
||||
}
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ fn handle_mouse_event(
|
||||
None => return EventResult::Ignored(None),
|
||||
}
|
||||
|
||||
let offset = config.scroll_lines.abs() as usize;
|
||||
let offset = config.scroll_lines.unsigned_abs();
|
||||
commands::scroll(cxt, offset, direction);
|
||||
|
||||
cxt.editor.tree.focus = current_view;
|
||||
|
@ -4,6 +4,7 @@
|
||||
use helix_dap::{self as dap, Client, Payload, Request, ThreadId};
|
||||
use helix_lsp::block_on;
|
||||
use log::warn;
|
||||
use std::fmt::Write;
|
||||
use std::io::ErrorKind;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@ -180,10 +181,10 @@ pub async fn handle_debugger_message(&mut self, payload: helix_dap::Payload) ->
|
||||
|
||||
let mut status = format!("{} stopped because of {}", scope, reason);
|
||||
if let Some(desc) = description {
|
||||
status.push_str(&format!(" {}", desc));
|
||||
write!(status, " {}", desc).unwrap();
|
||||
}
|
||||
if let Some(text) = text {
|
||||
status.push_str(&format!(" {}", text));
|
||||
write!(status, " {}", text).unwrap();
|
||||
}
|
||||
if all_threads_stopped {
|
||||
status.push_str(" (all threads stopped)");
|
||||
|
Loading…
Reference in New Issue
Block a user