Skip to content

Commit 4882f4e

Browse files
committed
chore: satisfy the linter
1 parent a8cf446 commit 4882f4e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/matrix-sdk/src/room/futures.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,21 @@ impl<'a> IntoFuture for SendStateEventRaw<'a> {
443443
boxed_into_future!(extra_bounds: 'a);
444444

445445
fn into_future(self) -> Self::IntoFuture {
446+
#[cfg(feature = "e2e-encryption")]
446447
let Self { room, mut event_type, state_key, mut content, tracing_span, request_config } =
447448
self;
448449

450+
// This is here purely to satisfy the linter on non-encrypting targets.
451+
#[cfg(not(feature = "e2e-encryption"))]
452+
let Self { room, event_type, state_key, content, tracing_span, request_config } = self;
453+
449454
let fut = async move {
450455
room.ensure_room_joined()?;
456+
457+
#[cfg(feature = "e2e-encryption")]
451458
let mut state_key = state_key.to_owned();
459+
#[cfg(not(feature = "e2e-encryption"))]
460+
let state_key = state_key.to_owned();
452461

453462
#[cfg(feature = "e2e-encryption")]
454463
if Self::should_encrypt(room, event_type) {

0 commit comments

Comments
 (0)