mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
enable manual_is_variant_and lint
This commit is contained in:
parent
5048af3a8f
commit
41a5e6fb50
2 changed files with 4 additions and 6 deletions
|
|
@ -72,7 +72,6 @@ wildcard_dependencies = "warn"
|
|||
missing_errors_doc = "allow"
|
||||
missing_panics_doc = "allow"
|
||||
|
||||
manual_is_variant_and = "allow"
|
||||
mixed_attributes_style = "allow"
|
||||
multiple_bound_locations = "allow"
|
||||
option_as_ref_cloned = "allow"
|
||||
|
|
|
|||
|
|
@ -108,17 +108,16 @@ impl Service {
|
|||
#[tracing::instrument(skip(self), ret(level = "trace"))]
|
||||
fn user_was_joined(&self, shortstatehash: u64, user_id: &UserId) -> bool {
|
||||
self.user_membership(shortstatehash, user_id)
|
||||
.map(|s| s == MembershipState::Join)
|
||||
.unwrap_or_default()
|
||||
.is_ok_and(|s| s == MembershipState::Join)
|
||||
}
|
||||
|
||||
/// The user was an invited or joined room member at this state (potentially
|
||||
/// in the past)
|
||||
#[tracing::instrument(skip(self), ret(level = "trace"))]
|
||||
fn user_was_invited(&self, shortstatehash: u64, user_id: &UserId) -> bool {
|
||||
self.user_membership(shortstatehash, user_id)
|
||||
.map(|s| s == MembershipState::Join || s == MembershipState::Invite)
|
||||
.unwrap_or_default()
|
||||
self.user_membership(shortstatehash, user_id).is_ok_and(|s| {
|
||||
s == MembershipState::Join || s == MembershipState::Invite
|
||||
})
|
||||
}
|
||||
|
||||
/// Whether a server is allowed to see an event through federation, based on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue