Skip to content

Commit 386d482

Browse files
committed
style(services): reformat extract_fields and copy_to_clipboard
1 parent 58c3b38 commit 386d482

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,9 +1494,9 @@ fi
14941494
))
14951495
})?;
14961496

1497-
clipboard.set_text(text).map_err(|e| {
1498-
Error::Config(format!("Failed to copy to clipboard: {e}"))
1499-
})?;
1497+
clipboard
1498+
.set_text(text)
1499+
.map_err(|e| Error::Config(format!("Failed to copy to clipboard: {e}")))?;
15001500

15011501
Ok(())
15021502
}

src/services/differ.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ impl AstDiffer {
185185
) {
186186
let name = child
187187
.child_by_field_name("name")
188-
.or_else(|| child.child_by_field_name("declarations").and_then(|d| d.child(0)).and_then(|n| n.child_by_field_name("name")))
188+
.or_else(|| {
189+
child
190+
.child_by_field_name("declarations")
191+
.and_then(|d| d.child(0))
192+
.and_then(|n| n.child_by_field_name("name"))
193+
})
189194
.and_then(|n| n.utf8_text(source.as_bytes()).ok())
190195
.unwrap_or("")
191196
.to_string();

0 commit comments

Comments
 (0)