mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
Update MSRV to 1.84.0
And appease clippy (`__CARGO_FIX_YOLO=1 cargo clippy --fix` plus some manual type shuffling).
This commit is contained in:
parent
5616510727
commit
175a62007d
20 changed files with 83 additions and 89 deletions
|
|
@ -443,8 +443,8 @@ impl Service {
|
|||
&self.config.turn.secret
|
||||
}
|
||||
|
||||
pub(crate) fn emergency_password(&self) -> &Option<String> {
|
||||
&self.config.emergency_password
|
||||
pub(crate) fn emergency_password(&self) -> Option<&str> {
|
||||
self.config.emergency_password.as_deref()
|
||||
}
|
||||
|
||||
/// If the emergency password option is set, attempts to set the emergency
|
||||
|
|
@ -455,10 +455,9 @@ impl Service {
|
|||
let inner = || -> Result<bool> {
|
||||
let admin_bot = self.admin_bot_user_id.as_ref();
|
||||
|
||||
services().users.set_password(
|
||||
admin_bot,
|
||||
self.emergency_password().as_deref(),
|
||||
)?;
|
||||
services()
|
||||
.users
|
||||
.set_password(admin_bot, self.emergency_password())?;
|
||||
|
||||
let (ruleset, res) = match self.emergency_password() {
|
||||
Some(_) => (Ruleset::server_default(admin_bot), Ok(true)),
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ impl Service {
|
|||
let mut results = Vec::new();
|
||||
|
||||
while let Some(current_room) = {
|
||||
while stack.last().map_or(false, Vec::is_empty) {
|
||||
while stack.last().is_some_and(Vec::is_empty) {
|
||||
stack.pop();
|
||||
}
|
||||
if stack.is_empty() {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ impl Service {
|
|||
})
|
||||
})
|
||||
.transpose()?
|
||||
.map_or(false, |ignored| {
|
||||
.is_some_and(|ignored| {
|
||||
ignored
|
||||
.content
|
||||
.ignored_users
|
||||
|
|
|
|||
|
|
@ -726,9 +726,10 @@ impl Service {
|
|||
let matching_users = |users: &NamespaceRegex| {
|
||||
appservice.users.is_match(pdu.sender.as_str())
|
||||
|| pdu.kind == TimelineEventType::RoomMember
|
||||
&& pdu.state_key.as_ref().map_or(false, |state_key| {
|
||||
users.is_match(state_key)
|
||||
})
|
||||
&& pdu
|
||||
.state_key
|
||||
.as_ref()
|
||||
.is_some_and(|state_key| users.is_match(state_key))
|
||||
};
|
||||
let matching_aliases = |aliases: &NamespaceRegex| {
|
||||
services()
|
||||
|
|
|
|||
|
|
@ -464,8 +464,8 @@ impl Service {
|
|||
&self,
|
||||
user_id: &UserId,
|
||||
master_key: &Raw<CrossSigningKey>,
|
||||
self_signing_key: &Option<Raw<CrossSigningKey>>,
|
||||
user_signing_key: &Option<Raw<CrossSigningKey>>,
|
||||
self_signing_key: Option<&Raw<CrossSigningKey>>,
|
||||
user_signing_key: Option<&Raw<CrossSigningKey>>,
|
||||
notify: bool,
|
||||
) -> Result<()> {
|
||||
self.db.add_cross_signing_keys(
|
||||
|
|
|
|||
|
|
@ -140,8 +140,8 @@ pub(crate) trait Data: Send + Sync {
|
|||
&self,
|
||||
user_id: &UserId,
|
||||
master_key: &Raw<CrossSigningKey>,
|
||||
self_signing_key: &Option<Raw<CrossSigningKey>>,
|
||||
user_signing_key: &Option<Raw<CrossSigningKey>>,
|
||||
self_signing_key: Option<&Raw<CrossSigningKey>>,
|
||||
user_signing_key: Option<&Raw<CrossSigningKey>>,
|
||||
notify: bool,
|
||||
) -> Result<()>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue