Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
rustup default beta
rustup component add clippy
rustup update --no-self-update

# FIXME(msrv): suggestions do not work in 1.23, nor dows `#![allow(clippy::...)]`
- run: cargo clippy --all -- -Aclippy::while_let_loop

msrv:
Expand All @@ -67,7 +65,7 @@ jobs:

- name: Update rust
run: |
rustup default 1.23.0
rustup default 1.63.0
rustup update --no-self-update

- run: cargo build
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Support for matching file paths against Unix shell style patterns.
"""
categories = ["filesystem"]
rust-version = "1.23.0"
rust-version = "1.63.0"

[dev-dependencies]
# FIXME: This should be replaced by `tempfile`
Expand Down
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
html_root_url = "https://docs.rs/glob/0.3.1"
)]
#![deny(missing_docs)]
#![allow(clippy::while_let_loop)]

#[cfg(test)]
#[macro_use]
Expand Down Expand Up @@ -390,7 +391,7 @@ impl Iterator for Paths {
if let Some(scope) = self.scope.take() {
if !self.dir_patterns.is_empty() {
// Shouldn't happen, but we're using -1 as a special index.
assert!(self.dir_patterns.len() < std::usize::MAX);
assert!(self.dir_patterns.len() < usize::MAX);

fill_todo(&mut self.todo, &self.dir_patterns, 0, &scope, self.options);
}
Expand All @@ -408,7 +409,7 @@ impl Iterator for Paths {

// idx -1: was already checked by fill_todo, maybe path was '.' or
// '..' that we can't match here because of normalization.
if idx == std::usize::MAX {
if idx == usize::MAX {
if self.require_dir && !path.is_directory {
continue;
}
Expand Down Expand Up @@ -895,7 +896,7 @@ fn fill_todo(
// We know it's good, so don't make the iterator match this path
// against the pattern again. In particular, it can't match
// . or .. globs since these never show up as path components.
todo.push(Ok((next_path, std::usize::MAX)));
todo.push(Ok((next_path, usize::MAX)));
} else {
fill_todo(todo, patterns, idx + 1, &next_path, options);
}
Expand Down