about summary refs log tree commit diff
path: root/compiler/rustc_parse_format/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-24 01:59:34 +0000
committerbors <bors@rust-lang.org>2025-01-24 01:59:34 +0000
commit1c9837df1dde9b234229709e89b3672bd3cf04a4 (patch)
tree4d956f28c67a405de6f8cb0515e242d00f59fdb2 /compiler/rustc_parse_format/src
parent22a220a1a8280a262a277fc24661511f6c4dab51 (diff)
parent7d2600698d2acc2b2497dab18433dd6fd5bdd2d6 (diff)
downloadrust-1c9837df1dde9b234229709e89b3672bd3cf04a4.tar.gz
rust-1c9837df1dde9b234229709e89b3672bd3cf04a4.zip
Auto merge of #135947 - matthiaskrgr:rollup-k9jpfls, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #135073 (Implement `ByteStr` and `ByteString` types)
 - #135492 (Add missing check for async body when suggesting await on futures.)
 - #135766 (handle global trait bounds defining assoc types)
 - #135880 (Get rid of RunCompiler)
 - #135908 (rustc_codegen_llvm: remove outdated asm-to-obj codegen note)
 - #135911 (Allow `arena_cache` queries to return `Option<&'tcx T>`)
 - #135920 (simplify parse_format::Parser::ws by using next_if)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse_format/src')
-rw-r--r--compiler/rustc_parse_format/src/lib.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs
index 9a3e79c16b4..5418f054beb 100644
--- a/compiler/rustc_parse_format/src/lib.rs
+++ b/compiler/rustc_parse_format/src/lib.rs
@@ -514,13 +514,7 @@ impl<'a> Parser<'a> {
 
     /// Consumes all whitespace characters until the first non-whitespace character
     fn ws(&mut self) {
-        while let Some(&(_, c)) = self.cur.peek() {
-            if c.is_whitespace() {
-                self.cur.next();
-            } else {
-                break;
-            }
-        }
+        while let Some(_) = self.cur.next_if(|&(_, c)| c.is_whitespace()) {}
     }
 
     /// Parses all of a string which is to be considered a "raw literal" in a