Skip to content

Commit c935aa1

Browse files
committed
format
1 parent 8b623ae commit c935aa1

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/cql.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,18 @@ pub fn process(
233233
let min = wrapped_min.unwrap().to_string();
234234
condition_string = condition_string
235235
.replace("between {{D1}} and {{D2}}", " >= {{D1}}")
236-
.replace("between Ceiling({{D1}}) and Ceiling({{D2}}", " >= Ceiling({{D1}}");
236+
.replace(
237+
"between Ceiling({{D1}}) and Ceiling({{D2}}",
238+
" >= Ceiling({{D1}}",
239+
);
237240
condition_string = condition_string.replace("{{D1}}", min.as_str()); // no CQL injection possible here
238241

239242
filter_string = filter_string
240243
.replace("between {{D1}} and {{D2}}", " >= {{D1}}")
241-
.replace("between Ceiling({{D1}}) and Ceiling({{D2}}", " >= Ceiling({{D1}}"); // no condition needed, "" stays ""
244+
.replace(
245+
"between Ceiling({{D1}}) and Ceiling({{D2}}",
246+
" >= Ceiling({{D1}}",
247+
); // no condition needed, "" stays ""
242248
filter_string = filter_string.replace("{{D1}}", min.as_str());
243249
// no condition needed, "" stays ""; no CQL injection possible here
244250
} else {
@@ -248,13 +254,19 @@ pub fn process(
248254
// only max is defined
249255
condition_string = condition_string
250256
.replace("between {{D1}} and {{D2}}", " <= {{D2}}")
251-
.replace("between Ceiling({{D1}}) and Ceiling({{D2}}", " <= Ceiling({{D2}}");
257+
.replace(
258+
"between Ceiling({{D1}}) and Ceiling({{D2}}",
259+
" <= Ceiling({{D2}}",
260+
);
252261
condition_string =
253262
condition_string.replace("{{D2}}", max.as_str()); // no CQL injection possible here
254263

255264
filter_string = filter_string
256265
.replace("between {{D1}} and {{D2}}", " <= {{D2}}")
257-
.replace("between Ceiling({{D1}}) and Ceiling({{D2}}", " <= Ceiling({{D2}}"); // no condition needed, "" stays ""
266+
.replace(
267+
"between Ceiling({{D1}}) and Ceiling({{D2}}",
268+
" <= Ceiling({{D2}}",
269+
); // no condition needed, "" stays ""
258270
filter_string = filter_string.replace("{{D2}}", max.as_str());
259271
// no condition needed, "" stays ""; no CQL injection possible here
260272
} else {

0 commit comments

Comments
 (0)