fix: remove warnings
This commit is contained in:
parent
2808dd2000
commit
df4c38cb61
13 changed files with 14 additions and 68 deletions
|
@ -19,7 +19,7 @@ thread_local! {
|
|||
|
||||
struct PreparedStatementIterator<'a> {
|
||||
pub iterator: Box<dyn Iterator<Item = TupleOfBytes> + 'a>,
|
||||
pub statement_ref: NonAliasingBox<rusqlite::Statement<'a>>,
|
||||
pub _statement_ref: NonAliasingBox<rusqlite::Statement<'a>>,
|
||||
}
|
||||
|
||||
impl Iterator for PreparedStatementIterator<'_> {
|
||||
|
@ -184,7 +184,7 @@ impl SqliteTable {
|
|||
|
||||
Box::new(PreparedStatementIterator {
|
||||
iterator,
|
||||
statement_ref,
|
||||
_statement_ref: statement_ref,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ impl Tree for SqliteTable {
|
|||
);
|
||||
Box::new(PreparedStatementIterator {
|
||||
iterator,
|
||||
statement_ref,
|
||||
_statement_ref: statement_ref,
|
||||
})
|
||||
} else {
|
||||
let statement = Box::leak(Box::new(
|
||||
|
@ -309,7 +309,7 @@ impl Tree for SqliteTable {
|
|||
|
||||
Box::new(PreparedStatementIterator {
|
||||
iterator,
|
||||
statement_ref,
|
||||
_statement_ref: statement_ref,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ use ruma::{
|
|||
},
|
||||
events::{
|
||||
room::{name::RoomNameEventContent, power_levels::RoomPowerLevelsEventContent},
|
||||
AnySyncRoomEvent, EventType, RoomEventType, StateEventType,
|
||||
AnySyncRoomEvent, RoomEventType, StateEventType,
|
||||
},
|
||||
push::{Action, PushConditionRoomCtx, PushFormat, Ruleset, Tweak},
|
||||
serde::Raw,
|
||||
|
|
|
@ -1835,14 +1835,6 @@ impl Rooms {
|
|||
})
|
||||
.transpose()?;
|
||||
|
||||
let create_prev_event = if prev_events.len() == 1
|
||||
&& Some(&prev_events[0]) == create_event.as_ref().map(|c| &c.event_id)
|
||||
{
|
||||
create_event
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
// If there was no create event yet, assume we are creating a version 6 room right now
|
||||
let room_version_id = create_event_content
|
||||
.map_or(RoomVersionId::V6, |create_event| create_event.room_version);
|
||||
|
@ -1978,7 +1970,7 @@ impl Rooms {
|
|||
self.room_servers(room_id).filter_map(|r| r.ok()).collect();
|
||||
|
||||
// In case we are kicking or banning a user, we need to inform their server of the change
|
||||
if pdu.kind == EventType::RoomMember {
|
||||
if pdu.kind == RoomEventType::RoomMember {
|
||||
if let Some(state_key_uid) = &pdu
|
||||
.state_key
|
||||
.as_ref()
|
||||
|
@ -2001,7 +1993,7 @@ impl Rooms {
|
|||
|
||||
// If the RoomMember event has a non-empty state_key, it is targeted at someone.
|
||||
// If it is our appservice user, we send this PDU to it.
|
||||
if pdu.kind == EventType::RoomMember {
|
||||
if pdu.kind == RoomEventType::RoomMember {
|
||||
if let Some(state_key_uid) = &pdu
|
||||
.state_key
|
||||
.as_ref()
|
||||
|
|
|
@ -23,10 +23,7 @@ use ruma::{
|
|||
OutgoingRequest,
|
||||
},
|
||||
device_id,
|
||||
events::{
|
||||
push_rules::PushRulesEvent, AnySyncEphemeralRoomEvent, EventType,
|
||||
GlobalAccountDataEventType,
|
||||
},
|
||||
events::{push_rules::PushRulesEvent, AnySyncEphemeralRoomEvent, GlobalAccountDataEventType},
|
||||
push,
|
||||
receipt::ReceiptType,
|
||||
uint, MilliSecondsSinceUnixEpoch, ServerName, UInt, UserId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue