Skip to content

Commit eff5b7b

Browse files
bump rust toolchain to 1.90 (#242)
1 parent a080e18 commit eff5b7b

File tree

10 files changed

+52
-39
lines changed

10 files changed

+52
-39
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
1313
### Removed - for now removed features
1414
### Fixed - for any bug fixes
1515
### Security - in case of vulnerabilities
16-
[${version}]: https://github.com/joshuadavidthomas/django-bird/releases/tag/v${version}
16+
[${version}]: https://github.com/joshuadavidthomas/django-language-server/releases/tag/v${version}
1717
-->
1818

1919
## [Unreleased]
2020

21+
### Changed
22+
23+
- Bumped Rust toolchain from 1.88 to 1.90
24+
2125
## [5.2.0]
2226

2327
### Added

crates/djls-ide/src/completions.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -386,40 +386,40 @@ fn generate_tag_name_completions(
386386

387387
// First, check if we should suggest end tags
388388
// If partial starts with "end", prioritize end tags
389-
if partial.starts_with("end") && tag_specs.is_some() {
390-
let specs = tag_specs.unwrap();
391-
392-
// Add all end tags that match the partial
393-
for (opener_name, spec) in specs {
394-
if let Some(end_tag) = &spec.end_tag {
395-
if end_tag.name.starts_with(partial) {
396-
// Create a completion for the end tag
397-
let mut insert_text = String::new();
398-
if needs_space {
399-
insert_text.push(' ');
400-
}
401-
insert_text.push_str(&end_tag.name);
389+
if partial.starts_with("end") {
390+
if let Some(specs) = tag_specs {
391+
// Add all end tags that match the partial
392+
for (opener_name, spec) in specs {
393+
if let Some(end_tag) = &spec.end_tag {
394+
if end_tag.name.starts_with(partial) {
395+
// Create a completion for the end tag
396+
let mut insert_text = String::new();
397+
if needs_space {
398+
insert_text.push(' ');
399+
}
400+
insert_text.push_str(&end_tag.name);
402401

403-
// Add closing based on what's already present
404-
match closing {
405-
ClosingBrace::PartialClose | ClosingBrace::None => {
406-
insert_text.push_str(" %}");
402+
// Add closing based on what's already present
403+
match closing {
404+
ClosingBrace::PartialClose | ClosingBrace::None => {
405+
insert_text.push_str(" %}");
406+
}
407+
ClosingBrace::FullClose => {} // No closing needed
407408
}
408-
ClosingBrace::FullClose => {} // No closing needed
409-
}
410409

411-
completions.push(lsp_types::CompletionItem {
412-
label: end_tag.name.to_string(),
413-
kind: Some(lsp_types::CompletionItemKind::KEYWORD),
414-
detail: Some(format!("End tag for {opener_name}")),
415-
text_edit: Some(tower_lsp_server::lsp_types::CompletionTextEdit::Edit(
416-
lsp_types::TextEdit::new(replacement_range, insert_text.clone()),
417-
)),
418-
insert_text_format: Some(lsp_types::InsertTextFormat::PLAIN_TEXT),
419-
filter_text: Some(end_tag.name.to_string()),
420-
sort_text: Some(format!("0_{}", end_tag.name.as_ref())), // Priority sort
421-
..Default::default()
422-
});
410+
completions.push(lsp_types::CompletionItem {
411+
label: end_tag.name.to_string(),
412+
kind: Some(lsp_types::CompletionItemKind::KEYWORD),
413+
detail: Some(format!("End tag for {opener_name}")),
414+
text_edit: Some(tower_lsp_server::lsp_types::CompletionTextEdit::Edit(
415+
lsp_types::TextEdit::new(replacement_range, insert_text.clone()),
416+
)),
417+
insert_text_format: Some(lsp_types::InsertTextFormat::PLAIN_TEXT),
418+
filter_text: Some(end_tag.name.to_string()),
419+
sort_text: Some(format!("0_{}", end_tag.name.as_ref())), // Priority sort
420+
..Default::default()
421+
});
422+
}
423423
}
424424
}
425425
}

crates/djls-project/src/django.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pub fn django_available(db: &dyn ProjectDb, project: Project) -> bool {
2929

3030
/// Get the Django settings module name for the current project.
3131
///
32-
/// Returns the settings_module_override from project, or inspector result,
33-
/// or DJANGO_SETTINGS_MODULE env var, or attempts to detect it.
32+
/// Returns the `settings_module_override` from project, or inspector result,
33+
/// or `DJANGO_SETTINGS_MODULE` env var, or attempts to detect it.
3434
#[salsa::tracked]
3535
pub fn django_settings_module(db: &dyn ProjectDb, project: Project) -> Option<String> {
3636
// Check project override first

crates/djls-project/src/django/templatetags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::Project;
1212
/// Get template tags for the current project by querying the inspector.
1313
///
1414
/// This tracked function calls the inspector to retrieve Django template tags
15-
/// and parses the JSON response into a TemplateTags struct.
15+
/// and parses the JSON response into a `TemplateTags` struct.
1616
#[salsa::tracked]
1717
pub fn get_templatetags(db: &dyn ProjectDb, _project: Project) -> Option<TemplateTags> {
1818
let json_str = inspector_run(db, Query::Templatetags)?;

crates/djls-project/src/inspector/queries.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub enum Query {
1313

1414
#[derive(Serialize, Deserialize)]
1515
#[allow(clippy::struct_field_names)]
16+
#[allow(dead_code)]
1617
pub struct PythonEnvironmentQueryData {
1718
pub sys_base_prefix: Utf8PathBuf,
1819
pub sys_executable: Utf8PathBuf,
@@ -24,6 +25,7 @@ pub struct PythonEnvironmentQueryData {
2425

2526
#[derive(Serialize, Deserialize)]
2627
#[serde(rename_all = "lowercase")]
28+
#[allow(dead_code)]
2729
pub enum VersionReleaseLevel {
2830
Alpha,
2931
Beta,
@@ -32,11 +34,13 @@ pub enum VersionReleaseLevel {
3234
}
3335

3436
#[derive(Serialize, Deserialize)]
37+
#[allow(dead_code)]
3538
pub struct TemplateTagQueryData {
3639
pub templatetags: Vec<TemplateTag>,
3740
}
3841

3942
#[derive(Serialize, Deserialize)]
43+
#[allow(dead_code)]
4044
pub struct TemplateTag {
4145
pub name: String,
4246
pub module: String,

crates/djls-project/src/python.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl fmt::Display for PythonEnvironment {
209209
///
210210
/// This Salsa tracked function discovers the Python environment based on:
211211
/// 1. Explicit venv path from project config
212-
/// 2. VIRTUAL_ENV environment variable
212+
/// 2. `VIRTUAL_ENV` environment variable
213213
/// 3. Common venv directories in project root (.venv, venv, env, .env)
214214
/// 4. System Python as fallback
215215
#[salsa::tracked]
@@ -607,7 +607,7 @@ mod tests {
607607
use super::*;
608608
use crate::inspector::pool::InspectorPool;
609609

610-
/// Test implementation of ProjectDb for unit tests
610+
/// Test implementation of `ProjectDb` for unit tests
611611
#[salsa::db]
612612
#[derive(Clone)]
613613
struct TestDatabase {

crates/djls-semantic/src/blocks/snapshot.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use super::tree::BlockTree;
1111
// TODO: centralize salsa struct snapshots so this mess can be shared
1212

1313
#[derive(Serialize)]
14+
#[allow(dead_code)]
1415
pub struct BlockTreeSnapshot {
1516
roots: Vec<u32>,
1617
root_ids: Vec<u32>,
@@ -143,6 +144,7 @@ impl From<&BlockTree> for BlockTreeSnapshot {
143144

144145
#[derive(Serialize)]
145146
#[serde(tag = "kind")]
147+
#[allow(dead_code)]
146148
pub enum BlockSnapshot {
147149
Container {
148150
container_span: Span,
@@ -156,6 +158,7 @@ pub enum BlockSnapshot {
156158

157159
#[derive(Serialize)]
158160
#[serde(tag = "node")]
161+
#[allow(dead_code)]
159162
pub enum BlockNodeSnapshot {
160163
Branch {
161164
block_id: u32,

crates/djls-semantic/src/blocks/tree.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ impl BlockTree {
1717
}
1818
}
1919

20+
#[allow(dead_code)]
2021
pub fn roots(&self) -> &Vec<BlockId> {
2122
&self.roots
2223
}
@@ -25,6 +26,7 @@ impl BlockTree {
2526
&mut self.roots
2627
}
2728

29+
#[allow(dead_code)]
2830
pub fn blocks(&self) -> &Blocks {
2931
&self.blocks
3032
}

crates/djls-semantic/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub use templatetags::TagSpecs;
1616

1717
/// Validate a Django template node list and return validation errors.
1818
///
19-
/// This function runs the TagValidator on the parsed node list to check for:
19+
/// This function runs the `TagValidator` on the parsed node list to check for:
2020
/// - Unclosed block tags
2121
/// - Mismatched tag pairs
2222
/// - Orphaned intermediate tags

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.88"
2+
channel = "1.90"

0 commit comments

Comments
 (0)