about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-28 02:34:16 +0000
committerbors <bors@rust-lang.org>2023-09-28 02:34:16 +0000
commit2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e (patch)
treea52fbccc708b2a34ca5b757be5de276d071b557c
parentb9dd2ce4081be0698bf7759f85e2314508b5c56a (diff)
parent809ab64e97fc7d7f0f74d2ba13811ce657a740e3 (diff)
downloadrust-2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e.tar.gz
rust-2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e.zip
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
-rw-r--r--src/librustdoc/html/markdown.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index 6dbf2185e3d..d24e6e5faf5 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -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();