Update edition to 2021

- Remove TryFrom/Into and FromIterator imports
- Prevent impl_validator_using_provider macro in sasl crate from
  constructing trait object

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-11-11 14:52:55 +01:00 committed by pep
commit 4089891f6c
94 changed files with 8 additions and 100 deletions

View file

@ -9,7 +9,7 @@ documentation = "https://docs.rs/sasl"
readme = "README.md"
keywords = ["sasl", "authentication"]
license = "MPL-2.0"
edition = "2018"
edition = "2021"
[badges]
gitlab = { repository = "xmpp-rs/xmpp-rs" }

View file

@ -14,7 +14,7 @@ macro_rules! impl_validator_using_provider {
identity: &$crate::common::Identity,
value: &$secret,
) -> Result<(), $crate::server::ValidatorError> {
if &(self as &$crate::server::Provider<$secret>).provide(identity)? == value {
if $crate::server::Provider::<$secret>::provide(self, identity).is_ok() {
Ok(())
} else {
Err($crate::server::ValidatorError::AuthenticationFailed)