Format let-else

This commit is contained in:
Lukas Wirth 2023-07-03 20:34:09 +02:00
parent 28fcd1bdd7
commit 69cd3c30ac
38 changed files with 572 additions and 306 deletions

View file

@ -61,7 +61,9 @@ impl CommentBlock {
let mut blocks = CommentBlock::extract_untagged(text);
blocks.retain_mut(|block| {
let first = block.contents.remove(0);
let Some(id) = first.strip_prefix(&tag) else { return false; };
let Some(id) = first.strip_prefix(&tag) else {
return false;
};
if block.is_doc {
panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}");