Handles the tag being the same name as the variant, which would cause a method with the same name as the type in C# which is not valid.
(variant_name: &String, tag: &String)
| 1980 | |
| 1981 | // Handles the tag being the same name as the variant, which would cause a method with the same name as the type in C# which is not valid. |
| 1982 | pub fn variant_new_func_name(variant_name: &String, tag: &String) -> String { |
| 1983 | if *tag == *variant_name { |
| 1984 | format!("{tag}_") // Underscores are not valid in wit identifiers so this should be safe. |
| 1985 | } else { |
| 1986 | tag.clone() |
| 1987 | } |
| 1988 | } |
| 1989 | |
| 1990 | #[derive(Copy, Clone, PartialEq, Eq, Debug)] |
| 1991 | pub(crate) enum ParameterType { |
no outgoing calls
no test coverage detected