From 861ce62e1469093cd77956acafca1a151852b778 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Mon, 31 Aug 2020 18:50:57 +0430 Subject: [PATCH] Userland: Improve 'ContentDispositionParser' in 'pro' This patch just applies a suggestion, making the code more readable. --- Userland/pro.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/pro.cpp b/Userland/pro.cpp index 4138f5568ff..6cc306f317d 100644 --- a/Userland/pro.cpp +++ b/Userland/pro.cpp @@ -43,7 +43,7 @@ public: { GenericLexer lexer(value); - lexer.consume_while([](auto c) { return is_whitespace(c); }); + lexer.ignore_while(is_whitespace); if (lexer.consume_specific("inline")) { m_kind = Kind::Inline; @@ -55,7 +55,7 @@ public: if (lexer.consume_specific("attachment")) { m_kind = Kind::Attachment; if (lexer.consume_specific(";")) { - lexer.consume_while([](auto c) { return is_whitespace(c); }); + lexer.ignore_while(is_whitespace); if (lexer.consume_specific("filename=")) { m_filename = lexer.consume_quoted_string(); } else { @@ -68,7 +68,7 @@ public: if (lexer.consume_specific("form-data")) { m_kind = Kind::FormData; while (lexer.consume_specific(";")) { - lexer.consume_while([](auto c) { return is_whitespace(c); }); + lexer.ignore_while(is_whitespace); if (lexer.consume_specific("name=")) { m_name = lexer.consume_quoted_string(); } else if (lexer.consume_specific("filename=")) {