Make sure qrcode feature is additive
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user