add comment explaining rule choice in robots

This commit is contained in:
Muki Kiboigo
2026-02-04 11:39:39 -08:00
parent e620c28a1c
commit 50aeb9ff21

View File

@@ -234,6 +234,8 @@ fn parseRulesWithUserAgent(
} }
} }
// If we have rules for our specific User-Agent, we will use those rules.
// If we don't have any rules, we fallback to using the wildcard ("*") rules.
if (rules.items.len > 0) { if (rules.items.len > 0) {
freeRulesInList(allocator, wildcard_rules.items); freeRulesInList(allocator, wildcard_rules.items);
return try rules.toOwnedSlice(allocator); return try rules.toOwnedSlice(allocator);