Skip to content

Commit

Permalink
std::flag: minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 20, 2024
1 parent cd32fc2 commit e670983
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions std/flag/flag.jule
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,12 @@ impl argParser {
if len(arg) == 1 { // Just dash.
error(arg + ": missing argument")
}
rarg := ([]rune(arg))[1:] // Start at 1 to skip dash.
for _, r in rarg {
// Start at 1 to skip dash.
for _, r in []rune(arg[1:]) {
mut flag := self.set.FindFlagShort(r)
if flag == nil {
error(arg + ": flag is not exist: " + str(r))
}

self.processFlag(flag) else { error(error) }
}
}
Expand Down

0 comments on commit e670983

Please sign in to comment.