Make sure qrcode feature is additive

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2023-12-15 11:01:03 +01:00
parent 5310f41cda
commit 6ffb0181e4
3 changed files with 6 additions and 3 deletions
+1
View File
@@ -34,6 +34,7 @@ Breaking changes:
are still allowed, but so are other types like `Box<serde_json::value::RawValue>`
- All "named futures" (structs implementing `IntoFuture`) are now exported from modules named
`futures` instead of directly in the respective parent module
- `Verification` is non-exhaustive, to make the `qrcode` cargo feature additive
Bug fixes:
@@ -53,6 +53,7 @@ pub use sas::SasVerification;
/// An enum over the different verification types the SDK supports.
#[derive(Debug, Clone)]
#[non_exhaustive]
pub enum Verification {
/// The `m.sas.v1` verification variant.
SasV1(SasVerification),
+4 -3
View File
@@ -107,12 +107,13 @@ async fn request_verification_handler(client: Client, request: VerificationReque
VerificationRequestState::Created { .. }
| VerificationRequestState::Requested { .. }
| VerificationRequestState::Ready { .. } => (),
VerificationRequestState::Transitioned { verification } => match verification {
Verification::SasV1(s) => {
VerificationRequestState::Transitioned { verification } => {
// We only support SAS verification.
if let Verification::SasV1(s) = verification {
tokio::spawn(sas_verification_handler(client, s));
break;
}
},
}
VerificationRequestState::Done | VerificationRequestState::Cancelled(_) => break,
}
}