Skip to content

Commit e78862d

Browse files
authored
Bump the MSRV to 1.63 (#172)
Upgrade to a more modern version of Rust. 1.63 is the MSRV of various common ecosystem crates (libc and everything that derives from it), we have no need to support anything older here.
1 parent 97e5ee9 commit e78862d

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454
rustup default beta
5555
rustup component add clippy
5656
rustup update --no-self-update
57-
58-
# FIXME(msrv): suggestions do not work in 1.23, nor dows `#![allow(clippy::...)]`
5957
- run: cargo clippy --all -- -Aclippy::while_let_loop
6058

6159
msrv:
@@ -67,7 +65,7 @@ jobs:
6765

6866
- name: Update rust
6967
run: |
70-
rustup default 1.23.0
68+
rustup default 1.63.0
7169
rustup update --no-self-update
7270
7371
- run: cargo build

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description = """
1010
Support for matching file paths against Unix shell style patterns.
1111
"""
1212
categories = ["filesystem"]
13-
rust-version = "1.23.0"
13+
rust-version = "1.63.0"
1414

1515
[dev-dependencies]
1616
# FIXME: This should be replaced by `tempfile`

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
html_root_url = "https://docs.rs/glob/0.3.1"
6262
)]
6363
#![deny(missing_docs)]
64+
#![allow(clippy::while_let_loop)]
6465

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

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

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

0 commit comments

Comments
 (0)