Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengxu committed Mar 31, 2024
1 parent c1ee5e1 commit 49b676c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/maple_core/src/stdio_server/provider/hooks/on_move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,13 +734,8 @@ async fn find_code_context(
path: &Path,
) -> Option<CodeContext> {
// Some checks against the latest preview line.
let Some(line) = lines.get(highlight_lnum - 1) else {
return None;
};

let Some(ext) = path.extension().and_then(|e| e.to_str()) else {
return None;
};
let line = lines.get(highlight_lnum - 1)?;
let ext = path.extension().and_then(|e| e.to_str())?;

let skip_context_tag = {
const BLACK_LIST: &[&str] = &["log", "txt", "lock", "toml", "yaml", "mod", "conf"];
Expand Down

0 comments on commit 49b676c

Please sign in to comment.