Skip to content

Commit 2a710db

Browse files
move import
1 parent 0980b36 commit 2a710db

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/djls-conf/src/tagspecs/legacy.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// project's deprecation policy.
77

88
use serde::Deserialize;
9+
use std::collections::HashMap;
910

1011
use super::ArgKindDef;
1112
use super::EndTagDef;
@@ -101,9 +102,6 @@ fn default_true() -> bool {
101102
/// Groups tags by module and creates the appropriate library structure.
102103
#[must_use]
103104
pub fn convert_legacy_tagspecs(legacy: Vec<LegacyTagSpecDef>) -> TagSpecDef {
104-
use std::collections::HashMap;
105-
106-
// Group tags by module
107105
let mut modules: HashMap<String, Vec<TagDef>> = HashMap::new();
108106

109107
for legacy_tag in legacy {
@@ -112,7 +110,6 @@ pub fn convert_legacy_tagspecs(legacy: Vec<LegacyTagSpecDef>) -> TagSpecDef {
112110
modules.entry(module).or_default().push(tag);
113111
}
114112

115-
// Create libraries from grouped tags
116113
let libraries = modules
117114
.into_iter()
118115
.map(|(module, tags)| TagLibraryDef {
@@ -134,7 +131,6 @@ pub fn convert_legacy_tagspecs(legacy: Vec<LegacyTagSpecDef>) -> TagSpecDef {
134131
}
135132

136133
fn convert_legacy_tag(legacy: LegacyTagSpecDef) -> TagDef {
137-
// Determine tag type based on presence of end_tag
138134
let tag_type = if legacy.end_tag.is_some() {
139135
TagTypeDef::Block
140136
} else {

0 commit comments

Comments
 (0)