Auto merge of #116208 - matthiaskrgr:the_loop_that_wasnt, r=GuillaumeGomez

rustdoc: while -> if

we will always return once we step inside the while-loop thus `if` is sufficient here
This commit is contained in:
bors 2023-09-28 02:34:16 +00:00
commit 2ba4eb2d49

View File

@ -1083,7 +1083,7 @@ impl<'a, 'tcx> TagIterator<'a, 'tcx> {
}
fn parse_in_attribute_block(&mut self) -> Option<LangStringToken<'a>> {
while let Some((pos, c)) = self.inner.next() {
if let Some((pos, c)) = self.inner.next() {
if c == '}' {
self.is_in_attribute_block = false;
return self.next();