Function clippy_lints::needless_continue::erode_from_back
[−]
[src]
pub fn erode_from_back(s: &str) -> String
Eats at s
from the end till a closing brace }
is encountered, and then
continues eating till a non-whitespace character is found.
e.g., the string
{ let x = 5; }
is transformed to
{ let x = 5;
NOTE: when there is no closing brace in s
, s
is not preserved, i.e.,
an empty string will be returned in that case.