syn2mas: replace #[allow] annotations with #[expect]

Also removes unused #[allow] annotations.
This commit is contained in:
Quentin Gliech
2025-04-18 11:34:27 +02:00
parent 35cd982e6f
commit b4a1e5f691
3 changed files with 4 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ pub enum Error {
},
#[error("writer connection pool shut down due to error")]
#[allow(clippy::enum_variant_names)]
#[expect(clippy::enum_variant_names)]
WriterConnectionPoolError,
#[error("inconsistent database: {0}")]
@@ -390,7 +390,6 @@ impl MasWriter {
/// Errors are returned in the following conditions:
///
/// - If the database connection experiences an error.
#[allow(clippy::missing_panics_doc)] // not real
#[tracing::instrument(name = "syn2mas.mas_writer.new", skip_all)]
pub async fn new(
mut conn: LockedMasDatabase,
@@ -632,7 +631,6 @@ impl MasWriter {
/// Errors are returned in the following conditions:
///
/// - If the database writer connection pool had an error.
#[allow(clippy::missing_panics_doc)] // not a real panic
#[tracing::instrument(skip_all, level = Level::DEBUG)]
pub fn write_users(&mut self, users: Vec<MasNewUser>) -> BoxFuture<'_, Result<(), Error>> {
self.writer_pool
@@ -711,7 +709,6 @@ impl MasWriter {
/// Errors are returned in the following conditions:
///
/// - If the database writer connection pool had an error.
#[allow(clippy::missing_panics_doc)] // not a real panic
#[tracing::instrument(skip_all, level = Level::DEBUG)]
pub fn write_passwords(
&mut self,

View File

@@ -140,7 +140,7 @@ struct MigrationState {
///
/// - An underlying database access error, either to MAS or to Synapse.
/// - Invalid data in the Synapse database.
#[allow(clippy::implicit_hasher)]
#[expect(clippy::implicit_hasher)]
pub async fn migrate(
mut synapse: SynapseReader<'_>,
mas: MasWriter,

View File

@@ -16,7 +16,7 @@ use sqlx::postgres::PgConnectOptions;
///
/// See: <https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html>
#[derive(Deserialize)]
#[allow(clippy::struct_excessive_bools)]
#[expect(clippy::struct_excessive_bools)]
pub struct Config {
pub database: DatabaseSection,
@@ -239,7 +239,7 @@ mod test {
#[test]
fn test_to_sqlx_postgres() {
#[track_caller]
#[allow(clippy::needless_pass_by_value)]
#[expect(clippy::needless_pass_by_value)]
fn assert_eq_options(config: DatabaseSection, uri: &str) {
let config_connect_options = config
.to_sqlx_postgres()