From 81e80023b46a274bf43f770de1035e38294682f2 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 21 Jul 2026 09:31:35 -0500 Subject: [PATCH] Set the edition to 2021 With the MSRV of 1.63, there is no reason to stay at the 2015 edition. --- Cargo.toml | 1 + README.md | 6 ------ src/lib.rs | 8 ++------ tests/glob-std.rs | 3 --- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1bd54b5..1ec0675 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ description = """ Support for matching file paths against Unix shell style patterns. """ categories = ["filesystem"] +edition = "2021" rust-version = "1.63.0" [dev-dependencies] diff --git a/README.md b/README.md index 3ad9ff8..1de004b 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,6 @@ To use `glob`, add this to your `Cargo.toml`: glob = "0.3.2" ``` -If you're using Rust 1.30 or earlier, or edition 2015, add this to your crate root: - -```rust -extern crate glob; -``` - ## Examples Print all jpg files in /media/ and all of its subdirectories. diff --git a/src/lib.rs b/src/lib.rs index 667dbaf..3ef5091 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,11 +64,7 @@ #![allow(clippy::while_let_loop)] #[cfg(test)] -#[macro_use] -extern crate doc_comment; - -#[cfg(test)] -doctest!("../README.md"); +doc_comment::doctest!("../README.md"); use std::cmp; use std::cmp::Ordering; @@ -319,7 +315,7 @@ impl Error for GlobError { } #[allow(unknown_lints, bare_trait_objects)] - fn cause(&self) -> Option<&Error> { + fn cause(&self) -> Option<&dyn Error> { Some(&self.error) } } diff --git a/tests/glob-std.rs b/tests/glob-std.rs index 8bd77f0..f8c5379 100644 --- a/tests/glob-std.rs +++ b/tests/glob-std.rs @@ -12,9 +12,6 @@ #![cfg_attr(test, deny(warnings))] -extern crate glob; -extern crate tempfile; - use glob::{glob, glob_with}; use std::env; use std::fs;