refactor: Fix imports, remove unused code, and resolve warnings

This commit is contained in:
Josh Thomas 2025-01-07 11:52:59 -06:00
parent adf7d1876e
commit 969d267e4c
3 changed files with 3 additions and 23 deletions

View file

@ -2,11 +2,12 @@ use anyhow::{anyhow, Result};
use djls_project::TemplateTags;
use std::collections::HashMap;
use tower_lsp::lsp_types::{
DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams,
CompletionItem, CompletionItemKind, CompletionResponse, Documentation, InsertTextFormat,
MarkupContent, MarkupKind, Position, Range, Url,
};
use tower_lsp::Client;
use super::diagnostics::Diagnostics;
use crate::diagnostics::Diagnostics;
#[derive(Debug)]
pub struct Store {

View file

@ -262,17 +262,8 @@ pub enum LexerError {
#[error("source is empty")]
EmptySource,
#[error("at beginning of source")]
AtBeginningOfSource,
#[error("at end of source")]
AtEndOfSource,
#[error("invalid character access")]
InvalidCharacterAccess,
#[error("unexpected token type '{0:?}'")]
UnexpectedTokenType(TokenType),
}
#[cfg(test)]

View file

@ -152,19 +152,7 @@ pub struct ArgSpec {
pub is_kwarg: bool,
}
impl ArgSpec {
pub fn is_placeholder(arg: &str) -> bool {
arg.starts_with('{') && arg.ends_with('}')
}
pub fn get_placeholder_name(arg: &str) -> Option<&str> {
if Self::is_placeholder(arg) {
Some(&arg[1..arg.len() - 1])
} else {
None
}
}
}
impl ArgSpec {}
#[cfg(test)]
mod tests {