Selective mangling for type parameter scopes around generic classes. If `mangled_names` is Some, only mangle names that are in the set; other names are left unmangled.
(
class_name: Option<&str>,
mangled_names: Option<&IndexSet<String>>,
name: &'a str,
)
| 2813 | /// If `mangled_names` is Some, only mangle names that are in the set; |
| 2814 | /// other names are left unmangled. |
| 2815 | pub(crate) fn maybe_mangle_name<'a>( |
| 2816 | class_name: Option<&str>, |
| 2817 | mangled_names: Option<&IndexSet<String>>, |
| 2818 | name: &'a str, |
| 2819 | ) -> Cow<'a, str> { |
| 2820 | if let Some(set) = mangled_names |
| 2821 | && !set.contains(name) |
| 2822 | { |
| 2823 | return name.into(); |
| 2824 | } |
| 2825 | mangle_name(class_name, name) |
| 2826 | } |
no test coverage detected