Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Dec 24, 2023
1 parent e1e16bf commit 669ada0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/glob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bool Glob::do_match(std::string_view str, std::span<Element> elements) {

switch (e.kind) {
case STRING:
if (str.empty() || !str.starts_with(e.str))
if (!str.starts_with(e.str))
return false;
str = str.substr(e.str.size());
break;
Expand Down

0 comments on commit 669ada0

Please sign in to comment.