Skip to content

Commit 1601ac3

Browse files
committed
style(conda): format selector parser
1 parent 8177232 commit 1601ac3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/foreign.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,18 +535,18 @@ fn structure_conda_requirement_selectors(text: &str) -> String {
535535
output.push(line.to_string());
536536
continue;
537537
}
538-
if requirements_indent.is_some_and(|base| {
539-
!trimmed.is_empty() && !trimmed.starts_with('#') && indent <= base
540-
}) {
538+
if requirements_indent
539+
.is_some_and(|base| !trimmed.is_empty() && !trimmed.starts_with('#') && indent <= base)
540+
{
541541
requirements_indent = None;
542542
}
543543
if requirements_indent.is_some() {
544544
if let Some(captures) = selector.captures(line) {
545545
let indentation = captures.get(1).map_or("", |value| value.as_str());
546546
let value = captures.get(2).map_or("", |value| value.as_str());
547547
let condition = captures.get(3).map_or("", |value| value.as_str());
548-
let quoted = serde_json::to_string(condition)
549-
.unwrap_or_else(|_| format!("\"{condition}\""));
548+
let quoted =
549+
serde_json::to_string(condition).unwrap_or_else(|_| format!("\"{condition}\""));
550550
output.push(format!("{indentation}- if: {quoted}"));
551551
output.push(format!("{indentation} then: {value}"));
552552
continue;

0 commit comments

Comments
 (0)