stris(1): fix bug only checking the first rune of strings
This commit is contained in:
parent
3910c341bd
commit
7c9f640ee1
@ -72,7 +72,7 @@ fn main() -> ExitCode {
|
|||||||
drop(argv);
|
drop(argv);
|
||||||
|
|
||||||
if reqs.inuse {
|
if reqs.inuse {
|
||||||
'args: for arg in args().skip(opts.index()) {
|
for arg in args().skip(opts.index()) {
|
||||||
for c in arg.chars() {
|
for c in arg.chars() {
|
||||||
if (reqs.ascii && c.is_ascii())
|
if (reqs.ascii && c.is_ascii())
|
||||||
|| (reqs.blank && c.is_whitespace())
|
|| (reqs.blank && c.is_whitespace())
|
||||||
@ -81,7 +81,7 @@ fn main() -> ExitCode {
|
|||||||
|| (reqs.lower && c.is_lowercase())
|
|| (reqs.lower && c.is_lowercase())
|
||||||
|| (reqs.upper && c.is_uppercase())
|
|| (reqs.upper && c.is_uppercase())
|
||||||
|| reqs.extra.contains(c) {
|
|| reqs.extra.contains(c) {
|
||||||
continue 'args;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
return ExitCode::FAILURE;
|
return ExitCode::FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user