fix(build): relax file-name prefix constraint

This commit is contained in:
newt 2026-06-08 17:54:12 +01:00 committed by Robin Appelman
commit f77ef38ca5

View file

@ -90,12 +90,15 @@ impl Kind {
return false;
};
if let Some(file_name) = file_name {
if !self.is_gc && !self.enum_prefix.is_empty() {
let file_no_sep = file_name.replace('_', "");
if !(file_name.contains(&self.enum_prefix)
|| file_name.replace('_', "").contains(&self.enum_prefix))
|| file_no_sep.contains(&self.enum_prefix))
{
return false;
}
}
}
struct_name.eq_ignore_ascii_case(stripped)
|| (self.is_gc
&& stripped