forc_doc/render/util/mod.rs
1//! Utilities for managing edge cases in rendering types and their corresponding documentation.
2pub mod format;
3
4/// Strip the generic suffix from a type name. For example, `Foo<T>` would become `Foo`.
5pub fn strip_generic_suffix(input: &str) -> &str {
6 input.split_once('<').map_or(input, |(head, _)| head)
7}