chore: code cleanup
https://rust-lang.github.io/rust-clippy/master/index.html#op_ref https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
This commit is contained in:
parent
7b98741163
commit
c86313d4fa
15 changed files with 56 additions and 92 deletions
|
@ -15,10 +15,7 @@ pub struct Service {
|
|||
}
|
||||
|
||||
impl Service {
|
||||
pub fn get_cached_eventid_authchain<'a>(
|
||||
&'a self,
|
||||
key: &[u64],
|
||||
) -> Result<Option<Arc<HashSet<u64>>>> {
|
||||
pub fn get_cached_eventid_authchain(&self, key: &[u64]) -> Result<Option<Arc<HashSet<u64>>>> {
|
||||
self.db.get_cached_eventid_authchain(key)
|
||||
}
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ impl Service {
|
|||
origin,
|
||||
get_room_state_ids::v1::Request {
|
||||
room_id: room_id.to_owned(),
|
||||
event_id: (&*incoming_pdu.event_id).to_owned(),
|
||||
event_id: (*incoming_pdu.event_id).to_owned(),
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
|
|
@ -37,7 +37,7 @@ pub trait Data: Send + Sync {
|
|||
room_id: &RoomId,
|
||||
) -> Box<dyn Iterator<Item = Result<OwnedServerName>> + 'a>;
|
||||
|
||||
fn server_in_room<'a>(&'a self, server: &ServerName, room_id: &RoomId) -> Result<bool>;
|
||||
fn server_in_room(&self, server: &ServerName, room_id: &RoomId) -> Result<bool>;
|
||||
|
||||
/// Returns an iterator of all rooms a server participates in (as far as we know).
|
||||
fn server_rooms<'a>(
|
||||
|
|
|
@ -378,7 +378,7 @@ impl Service {
|
|||
)?;
|
||||
let server_user = format!("@conduit:{}", services().globals.server_name());
|
||||
|
||||
let to_conduit = body.starts_with(&format!("{}: ", server_user));
|
||||
let to_conduit = body.starts_with(&format!("{server_user}: "));
|
||||
|
||||
// This will evaluate to false if the emergency password is set up so that
|
||||
// the administrator can execute commands as conduit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue