We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dabd8b2 commit 8e0dc98Copy full SHA for 8e0dc98
Cargo.toml
@@ -1,7 +1,7 @@
1
[package]
2
3
name = "glob"
4
-version = "0.2.1"
+version = "0.2.2"
5
authors = ["The Rust Project Developers"]
6
license = "MIT/Apache-2.0"
7
homepage = "https://github.com/rust-lang/glob"
src/lib.rs
@@ -497,7 +497,7 @@ impl Pattern {
497
}
498
'[' => {
499
500
- if i <= chars.len() - 4 && chars[i + 1] == '!' {
+ if i + 4 <= chars.len() && chars[i + 1] == '!' {
501
match chars[i + 3..].position_elem(&']') {
502
None => (),
503
Some(j) => {
@@ -508,7 +508,7 @@ impl Pattern {
508
continue;
509
510
511
- } else if i <= chars.len() - 3 && chars[i + 1] != '!' {
+ } else if i + 3 <= chars.len() && chars[i + 1] != '!' {
512
match chars[i + 2..].position_elem(&']') {
513
514
0 commit comments