refactor(derive): Clarify leading-space removal

This commit is contained in:
Ed Page 2022-11-07 07:49:44 -06:00
parent d1db3d2f0e
commit 6ace0410c1

View file

@ -33,9 +33,7 @@ pub fn process_doc_comment(
// remove one leading space no matter what
for line in lines.iter_mut() {
if line.starts_with(' ') {
*line = &line[1..];
}
*line = line.strip_prefix(' ').unwrap_or(line);
}
let short_name = format_ident!("{}", name);