1
Fork 0

more clippy::style fixes:

get_first
single_char_add_str
unnecessary_mut_passed
manual_map
manual_is_ascii_check
This commit is contained in:
Matthias Krüger 2023-07-23 13:11:20 +02:00
parent ed4c5fef72
commit af2b370100
8 changed files with 12 additions and 20 deletions

View file

@ -62,7 +62,7 @@ pub fn beautify_doc_string(data: Symbol, kind: CommentKind) -> Symbol {
CommentKind::Block => {
// Whatever happens, we skip the first line.
let mut i = lines
.get(0)
.first()
.map(|l| if l.trim_start().starts_with('*') { 0 } else { 1 })
.unwrap_or(0);
let mut j = lines.len();