Skip to content

Commit f3cb285

Browse files
committed
fix CI formatter check
1 parent 9d4eb92 commit f3cb285

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/parser/src/ast_builder.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ impl ASTBuilder {
251251
if let Some(declarator) = node.child_by_field_name("declarator") {
252252
if let Ok(_name_text) = declarator.utf8_text(source.as_bytes()) {
253253
// For C, the declarator might contain the function name
254-
if let Some(name) = ASTBuilder::extract_function_name_from_declarator(&declarator, source)
254+
if let Some(name) =
255+
ASTBuilder::extract_function_name_from_declarator(&declarator, source)
255256
{
256257
attributes.insert("name".to_string(), name);
257258
}
@@ -458,10 +459,7 @@ impl ASTBuilder {
458459
}
459460

460461
/// Extract function name from C function declarator
461-
fn extract_function_name_from_declarator(
462-
declarator: &Node,
463-
source: &str,
464-
) -> Option<String> {
462+
fn extract_function_name_from_declarator(declarator: &Node, source: &str) -> Option<String> {
465463
// For C, the function declarator structure is: function_declarator -> identifier
466464
for i in 0..declarator.child_count() {
467465
if let Some(child) = declarator.child(i) {
@@ -471,7 +469,9 @@ impl ASTBuilder {
471469
}
472470
}
473471
// Recursively search in children
474-
if let Some(name) = ASTBuilder::extract_function_name_from_declarator(&child, source) {
472+
if let Some(name) =
473+
ASTBuilder::extract_function_name_from_declarator(&child, source)
474+
{
475475
return Some(name);
476476
}
477477
}

0 commit comments

Comments
 (0)