fix clippy performance and sus warnings, remove 1 unwrap, forgot to increment db version
Signed-off-by: strawberry <strawberry@pupbrain.dev>
This commit is contained in:
parent
b4e2f7ca37
commit
2dc1c1fdcb
7 changed files with 47 additions and 22 deletions
|
@ -490,7 +490,7 @@ impl Service {
|
|||
if self.unix_socket_path().is_some() {
|
||||
match &self.unix_socket_path() {
|
||||
Some(path) => {
|
||||
std::fs::remove_file(path.to_owned()).unwrap();
|
||||
std::fs::remove_file(path).unwrap();
|
||||
}
|
||||
None => error!(
|
||||
"Unable to remove socket file at {:?} during shutdown.",
|
||||
|
|
|
@ -149,7 +149,9 @@ impl Service {
|
|||
// TODO: Sort children
|
||||
children_ids.reverse();
|
||||
|
||||
let chunk = self.get_room_chunk(sender_user, ¤t_room, children_pdus);
|
||||
let chunk = self
|
||||
.get_room_chunk(sender_user, ¤t_room, children_pdus)
|
||||
.await;
|
||||
if let Ok(chunk) = chunk {
|
||||
if left_to_skip > 0 {
|
||||
left_to_skip -= 1;
|
||||
|
@ -303,7 +305,7 @@ impl Service {
|
|||
})
|
||||
}
|
||||
|
||||
fn get_room_chunk(
|
||||
async fn get_room_chunk(
|
||||
&self,
|
||||
sender_user: &UserId,
|
||||
room_id: &RoomId,
|
||||
|
|
|
@ -859,7 +859,7 @@ impl Service {
|
|||
|
||||
let target = pdu
|
||||
.state_key()
|
||||
.filter(|v| v.starts_with("@"))
|
||||
.filter(|v| v.starts_with('@'))
|
||||
.unwrap_or(sender.as_str());
|
||||
let server_name = services().globals.server_name();
|
||||
let server_user = format!("@conduit:{}", server_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue