Function is_short_pattern

Source
pub(crate) fn is_short_pattern(
    context: &RewriteContext<'_>,
    pat: &Pat,
    pat_str: &str,
) -> bool
Expand description

Returns true if the given pattern is “short”. A short pattern is defined by the following grammar:

[small, ntp]: - single token - &[single-line, ntp]

[small]: - [small, ntp] - unary tuple constructor ([small, ntp]) - &[small]