From 43d44436d598e7d4de576e69b5c0c488026e2777 Mon Sep 17 00:00:00 2001 From: Gnome! Date: Wed, 3 Apr 2024 12:36:38 +0100 Subject: [PATCH] Bump edition to 2021 (#73) --- Cargo.toml | 1 + src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ff6eca9..e0d77cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ description = """ Implementations of string similarity metrics. Includes Hamming, Levenshtein, OSA, Damerau-Levenshtein, Jaro, Jaro-Winkler, and Sørensen-Dice. """ +edition = "2021" license = "MIT" rust-version = "1.56" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 6a3b098..3eea3bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ //! This library implements string similarity metrics. #![forbid(unsafe_code)] +#![warn(rust_2018_idioms)] #![allow( // these casts are sometimes needed. They restrict the length of input iterators // but there isn't really any way around this except for always working with @@ -9,7 +10,6 @@ clippy::cast_sign_loss, clippy::cast_precision_loss, // not practical - clippy::needless_pass_by_value, clippy::similar_names, // noisy clippy::missing_errors_doc, @@ -35,7 +35,7 @@ pub enum StrSimError { } impl Display for StrSimError { - fn fmt(&self, fmt: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), fmt::Error> { let text = match self { StrSimError::DifferentLengthArgs => "Differing length arguments provided", };