From 076b36c66d54a24a3f78dd5155107706f68b0538 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 9 Sep 2025 09:34:19 -0500 Subject: [PATCH] clippy and fmt fixes --- crates/djls-server/src/completions.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/djls-server/src/completions.rs b/crates/djls-server/src/completions.rs index c95b883..ef03eb2 100644 --- a/crates/djls-server/src/completions.rs +++ b/crates/djls-server/src/completions.rs @@ -407,8 +407,9 @@ fn generate_tag_name_completions( // Add closing based on what's already present match closing { - ClosingBrace::None => insert_text.push_str(" %}"), - ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } + ClosingBrace::PartialClose | ClosingBrace::None => { + insert_text.push_str(" %}"); + } ClosingBrace::FullClose => {} // No closing needed } @@ -454,12 +455,13 @@ fn generate_tag_name_completions( // Only add closing if the snippet doesn't already include it // (snippets for tags with end tags include their own %} closing) if !snippet.contains("%}") { - // Add closing based on what's already present - match closing { - ClosingBrace::None => text.push_str(" %}"), - ClosingBrace::PartialClose => text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } - ClosingBrace::FullClose => {} // No closing needed - } + // Add closing based on what's already present + match closing { + ClosingBrace::PartialClose | ClosingBrace::None => { + text.push_str(" %}"); + } + ClosingBrace::FullClose => {} // No closing needed + } } (text, InsertTextFormat::SNIPPET) @@ -542,8 +544,7 @@ fn generate_argument_completions( // Add closing if needed match closing { - ClosingBrace::None => insert_text.push_str(" %}"), - ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } + ClosingBrace::PartialClose | ClosingBrace::None => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } ClosingBrace::FullClose => {} // No closing needed } @@ -712,8 +713,7 @@ fn build_plain_insert_for_tag( // Add closing based on what's already present match closing { - ClosingBrace::None => insert_text.push_str(" %}"), - ClosingBrace::PartialClose => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } + ClosingBrace::PartialClose | ClosingBrace::None => insert_text.push_str(" %}"), // Include full closing since we're replacing the auto-paired } ClosingBrace::FullClose => {} // No closing needed }