about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-27 22:07:33 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-09-27 22:07:33 +0200
commit809ab64e97fc7d7f0f74d2ba13811ce657a740e3 (patch)
tree4e3669ed46149bfb08cb45cebee1208f336cdf01
parentd4589a492f5419220c73d216dd538feb30b9b0c5 (diff)
downloadrust-809ab64e97fc7d7f0f74d2ba13811ce657a740e3.tar.gz
rust-809ab64e97fc7d7f0f74d2ba13811ce657a740e3.zip
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();