diff --git a/deny.toml b/deny.toml index 149cdf4..889fe25 100644 --- a/deny.toml +++ b/deny.toml @@ -47,14 +47,7 @@ ignore = [ # List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. -allow = [ - "MIT", - "Apache-2.0", - "Unicode-3.0", - "Unicode-DFS-2016", - "Unlicense", - "BSD-3-Clause", -] +allow = ["MIT", "Apache-2.0", "Unicode-3.0", "Unlicense", "BSD-3-Clause"] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the # canonical license text of a valid SPDX license file. @@ -84,8 +77,8 @@ exceptions = [ # and the crate will be checked normally, which may produce warnings or errors # depending on the rest of your configuration #license-files = [ - # Each entry is a crate relative path, and the (opaque) hash of its contents - #{ path = "LICENSE", hash = 0xbd0eed23 } +# Each entry is a crate relative path, and the (opaque) hash of its contents +#{ path = "LICENSE", hash = 0xbd0eed23 } #] [licenses.private] @@ -153,6 +146,7 @@ allow = [ # Certain crates/versions that will be skipped when doing duplicate detection. skip = [ + { name = "regex-syntax" }, # phonenumber includes an additional older version... #{ name = "ansi_term", version = "=0.11.0" }, ] # Similarly to `skip` allows you to skip certain crates during duplicate diff --git a/garde/src/error.rs b/garde/src/error.rs index 69cffe5..7a8b481 100644 --- a/garde/src/error.rs +++ b/garde/src/error.rs @@ -142,7 +142,7 @@ impl_path_component_kind!(String => Key); impl_path_component_kind!(CompactString => Key); impl_path_component_kind!(NoKey => None); -impl<'a, T: PathComponentKind> PathComponentKind for &'a T { +impl PathComponentKind for &T { fn component_kind() -> Kind { T::component_kind() } @@ -197,7 +197,7 @@ impl std::fmt::Debug for Path { path: &'a Path, } - impl<'a> std::fmt::Debug for Components<'a> { + impl std::fmt::Debug for Components<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut list = f.debug_list(); list.entries(self.path.__iter().rev().map(|(_, c)| c)) diff --git a/garde/src/rules/inner.rs b/garde/src/rules/inner.rs index 00fbed6..da68acf 100644 --- a/garde/src/rules/inner.rs +++ b/garde/src/rules/inner.rs @@ -50,7 +50,7 @@ impl Inner for [T; N] { } } -impl<'a, T> Inner for &'a [T] { +impl Inner for &[T] { type Key = usize; fn validate_inner(&self, mut f: F) diff --git a/garde/src/rules/length/simple.rs b/garde/src/rules/length/simple.rs index 631cb83..261b06f 100644 --- a/garde/src/rules/length/simple.rs +++ b/garde/src/rules/length/simple.rs @@ -92,7 +92,7 @@ impl Simple for [T; N] { } } -impl<'a, const N: usize, T> Simple for &'a [T; N] { +impl Simple for &[T; N] { fn validate_length(&self, min: usize, max: usize) -> Result<(), Error> { super::check_len(self.len(), min, max) } diff --git a/garde/src/rules/mod.rs b/garde/src/rules/mod.rs index ad0f2c4..fa1b65f 100644 --- a/garde/src/rules/mod.rs +++ b/garde/src/rules/mod.rs @@ -25,7 +25,7 @@ pub trait AsStr { fn as_str(&self) -> &str; } -impl<'a> AsStr for &'a str { +impl AsStr for &str { fn as_str(&self) -> &str { self } @@ -37,7 +37,7 @@ impl AsStr for String { } } -impl<'a> AsStr for std::borrow::Cow<'a, str> { +impl AsStr for std::borrow::Cow<'_, str> { fn as_str(&self) -> &str { std::borrow::Cow::as_ref(self) } diff --git a/garde/src/validate.rs b/garde/src/validate.rs index 587f0d5..9f65bfb 100644 --- a/garde/src/validate.rs +++ b/garde/src/validate.rs @@ -120,7 +120,7 @@ impl Debug for Unvalidated { } } -impl<'a, T: ?Sized + Validate> Validate for &'a T { +impl Validate for &T { type Context = T::Context; fn validate_into( @@ -133,7 +133,7 @@ impl<'a, T: ?Sized + Validate> Validate for &'a T { } } -impl<'a, T: ?Sized + Validate> Validate for &'a mut T { +impl Validate for &mut T { type Context = T::Context; fn validate_into( @@ -332,7 +332,7 @@ impl Validate for Option { } } -impl<'a, B: Validate> Validate for std::borrow::Cow<'a, B> +impl Validate for std::borrow::Cow<'_, B> where B: ToOwned, { diff --git a/garde_derive/src/emit.rs b/garde_derive/src/emit.rs index be1470f..f08fa0b 100644 --- a/garde_derive/src/emit.rs +++ b/garde_derive/src/emit.rs @@ -47,7 +47,7 @@ struct Type<'a> { kind: &'a model::ValidateKind, } -impl<'a> ToTokens for Type<'a> { +impl ToTokens for Type<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { let is_transparent = self.is_transparent; match &self.kind { @@ -94,7 +94,7 @@ struct Variant<'a> { variant: &'a model::ValidateVariant, } -impl<'a> ToTokens for Variant<'a> { +impl ToTokens for Variant<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { let is_transparent = self.is_transparent; match &self.variant { @@ -122,7 +122,7 @@ struct Struct<'a> { fields: &'a [(Ident, model::ValidateField)], } -impl<'a> ToTokens for Struct<'a> { +impl ToTokens for Struct<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { Fields::new( self.fields @@ -147,7 +147,7 @@ struct Tuple<'a> { fields: &'a [model::ValidateField], } -impl<'a> ToTokens for Tuple<'a> { +impl ToTokens for Tuple<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { Fields::new( self.fields @@ -173,7 +173,7 @@ struct Inner<'a> { rule_set: &'a model::RuleSet, } -impl<'a> ToTokens for Inner<'a> { +impl ToTokens for Inner<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { let Inner { rules_mod, @@ -231,7 +231,7 @@ enum Binding<'a> { Index(usize), } -impl<'a> ToTokens for Binding<'a> { +impl ToTokens for Binding<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { match self { Binding::Ident(v) => v.to_tokens(tokens), @@ -240,7 +240,7 @@ impl<'a> ToTokens for Binding<'a> { } } -impl<'a> ToTokens for Rules<'a> { +impl ToTokens for Rules<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { let Rules { rules_mod, @@ -422,7 +422,7 @@ where struct Bindings<'a>(&'a model::ValidateVariant); -impl<'a> ToTokens for Bindings<'a> { +impl ToTokens for Bindings<'_> { fn to_tokens(&self, tokens: &mut TokenStream2) { match &self.0 { model::ValidateVariant::Struct(fields) => {