Skip to content

Commit 2da973d

Browse files
fmt
1 parent 7546a74 commit 2da973d

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

crates/djls-templates/src/templatetags/builtins.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ static BUILTIN_SPECS: LazyLock<TagSpecs> = LazyLock::new(|| {
2727
args: vec![],
2828
}),
2929
intermediate_tags: None,
30-
args: vec![Arg::choice("mode", vec!["on".to_string(), "off".to_string()])],
30+
args: vec![Arg::choice(
31+
"mode",
32+
vec!["on".to_string(), "off".to_string()],
33+
)],
3134
},
3235
TagSpec {
3336
name: Some("if".to_string()),
@@ -291,7 +294,11 @@ static BUILTIN_SPECS: LazyLock<TagSpecs> = LazyLock::new(|| {
291294
args: vec![],
292295
}),
293296
intermediate_tags: None,
294-
args: vec![Arg::var("timeout"), Arg::var("cache_key"), Arg::opt_varargs("variables")],
297+
args: vec![
298+
Arg::var("timeout"),
299+
Arg::var("cache_key"),
300+
Arg::opt_varargs("variables"),
301+
],
295302
},
296303
// Internationalization
297304
TagSpec {

crates/djls-templates/src/templatetags/specs.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ impl Arg {
132132
arg_type: ArgType::Simple(SimpleArgType::Variable),
133133
}
134134
}
135-
135+
136136
pub fn opt_var(name: impl Into<String>) -> Self {
137137
Self {
138138
name: name.into(),
139139
required: false,
140140
arg_type: ArgType::Simple(SimpleArgType::Variable),
141141
}
142142
}
143-
143+
144144
// Literal types
145145
pub fn literal(name: impl Into<String>) -> Self {
146146
Self {
@@ -149,15 +149,15 @@ impl Arg {
149149
arg_type: ArgType::Simple(SimpleArgType::Literal),
150150
}
151151
}
152-
152+
153153
pub fn opt_literal(name: impl Into<String>) -> Self {
154154
Self {
155155
name: name.into(),
156156
required: false,
157157
arg_type: ArgType::Simple(SimpleArgType::Literal),
158158
}
159159
}
160-
160+
161161
// String types
162162
pub fn string(name: impl Into<String>) -> Self {
163163
Self {
@@ -166,15 +166,15 @@ impl Arg {
166166
arg_type: ArgType::Simple(SimpleArgType::String),
167167
}
168168
}
169-
169+
170170
pub fn opt_string(name: impl Into<String>) -> Self {
171171
Self {
172172
name: name.into(),
173173
required: false,
174174
arg_type: ArgType::Simple(SimpleArgType::String),
175175
}
176176
}
177-
177+
178178
// Expression types
179179
pub fn expr(name: impl Into<String>) -> Self {
180180
Self {
@@ -183,7 +183,7 @@ impl Arg {
183183
arg_type: ArgType::Simple(SimpleArgType::Expression),
184184
}
185185
}
186-
186+
187187
// VarArgs types
188188
pub fn varargs(name: impl Into<String>) -> Self {
189189
Self {
@@ -192,15 +192,15 @@ impl Arg {
192192
arg_type: ArgType::Simple(SimpleArgType::VarArgs),
193193
}
194194
}
195-
195+
196196
pub fn opt_varargs(name: impl Into<String>) -> Self {
197197
Self {
198198
name: name.into(),
199199
required: false,
200200
arg_type: ArgType::Simple(SimpleArgType::VarArgs),
201201
}
202202
}
203-
203+
204204
// Choice types
205205
pub fn choice(name: impl Into<String>, choices: Vec<String>) -> Self {
206206
Self {
@@ -209,7 +209,7 @@ impl Arg {
209209
arg_type: ArgType::Choice { choice: choices },
210210
}
211211
}
212-
212+
213213
pub fn opt_choice(name: impl Into<String>, choices: Vec<String>) -> Self {
214214
Self {
215215
name: name.into(),

0 commit comments

Comments
 (0)