Translate `name` to a Rust `UpperCamelCase` identifier.
(name: &str)
| 478 | |
| 479 | /// Translate `name` to a Rust `UpperCamelCase` identifier. |
| 480 | pub fn to_rust_upper_camel_case(name: &str) -> String { |
| 481 | match name { |
| 482 | // We use `Host` as the name of the trait for host implementations |
| 483 | // to fill in, so rename it if "Host" is used as a regular identifier. |
| 484 | "host" => "Host_".into(), |
| 485 | s => s.to_upper_camel_case(), |
| 486 | } |
| 487 | } |
no outgoing calls
no test coverage detected