Function clippy_utils::source::str_literal_to_char_literal

source ·
pub fn str_literal_to_char_literal(
    cx: &LateContext<'_>,
    expr: &Expr<'_>,
    applicability: &mut Applicability,
    ascii_only: bool,
) -> Option<String>
Expand description

Converts expr to a char literal if it’s a str literal containing a single character (or a single byte with ascii_only)