attr_fn_like_width to 60

note the default is documented as 70 but this was not being honored by rustfmt

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-04-23 19:27:49 +00:00
parent 76509830e6
commit 5bcf3550ab
19 changed files with 190 additions and 42 deletions

View File

@@ -6,7 +6,11 @@ pub mod je;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub use je::{memory_stats, memory_usage, trim};
#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", not(feature = "jemalloc")))]
#[cfg(all(
not(target_env = "msvc"),
feature = "hardened_malloc",
not(feature = "jemalloc")
))]
pub mod hardened;
#[cfg(all(
not(target_env = "msvc"),

View File

@@ -606,7 +606,10 @@ pub struct Config {
/// spiders.
///
/// This is inherently false if `allow_federation` is disabled
#[serde(default = "true_fn", alias = "allow_profile_lookup_federation_requests")]
#[serde(
default = "true_fn",
alias = "allow_profile_lookup_federation_requests"
)]
pub allow_inbound_profile_lookup_federation_requests: bool,
/// Allow standard users to create rooms. Appservices and admins are always
@@ -1827,7 +1830,10 @@ pub struct TlsConfig {
#[allow(rustdoc::broken_intra_doc_links, rustdoc::bare_urls)]
#[derive(Clone, Debug, Deserialize, Default)]
#[config_example_generator(filename = "tuwunel-example.toml", section = "global.well_known")]
#[config_example_generator(
filename = "tuwunel-example.toml",
section = "global.well_known"
)]
pub struct WellKnownConfig {
/// The server URL that the client well-known file will serve. This should
/// not contain a port, and should just be a valid HTTPS URL.
@@ -1853,7 +1859,10 @@ pub struct WellKnownConfig {
#[derive(Clone, Copy, Debug, Deserialize, Default)]
#[allow(rustdoc::broken_intra_doc_links, rustdoc::bare_urls)]
#[config_example_generator(filename = "tuwunel-example.toml", section = "global.blurhashing")]
#[config_example_generator(
filename = "tuwunel-example.toml",
section = "global.blurhashing"
)]
pub struct BlurhashConfig {
/// blurhashing x component, 4 is recommended by https://blurha.sh/
///

View File

@@ -1,4 +1,8 @@
#![allow(clippy::cast_possible_wrap, clippy::cast_sign_loss, clippy::as_conversions)]
#![allow(
clippy::cast_possible_wrap,
clippy::cast_sign_loss,
clippy::as_conversions
)]
use std::{cmp::Ordering, fmt, fmt::Display, str::FromStr};

View File

@@ -134,7 +134,10 @@ fn deserialize_legacy_power_levels(content: &str) -> Option<RoomPowerLevelsEvent
#[derive(Deserialize)]
pub(crate) struct PowerLevelsContentFields {
#[serde(default, deserialize_with = "vec_deserialize_v1_powerlevel_values")]
#[serde(
default,
deserialize_with = "vec_deserialize_v1_powerlevel_values"
)]
pub(crate) users: Vec<(OwnedUserId, Int)>,
#[serde(default, deserialize_with = "deserialize_v1_powerlevel")]
@@ -157,7 +160,10 @@ impl PowerLevelsContentFields {
#[derive(Deserialize)]
struct IntPowerLevelsContentFields {
#[serde(default, deserialize_with = "vec_deserialize_int_powerlevel_values")]
#[serde(
default,
deserialize_with = "vec_deserialize_int_powerlevel_values"
)]
users: Vec<(OwnedUserId, Int)>,
#[serde(default)]
@@ -227,7 +233,10 @@ pub(crate) fn deserialize_power_levels_content_invite(
#[derive(Deserialize)]
pub(crate) struct PowerLevelsContentRedact {
#[serde(default = "default_power_level", deserialize_with = "deserialize_v1_powerlevel")]
#[serde(
default = "default_power_level",
deserialize_with = "deserialize_v1_powerlevel"
)]
pub(crate) redact: Int,
}

View File

@@ -123,7 +123,10 @@ pub fn name_from_path(path: &Path) -> Result<String> {
}
/// Get the (major, minor) of the block device on which Path is mounted.
#[allow(clippy::useless_conversion, clippy::unnecessary_fallible_conversions)]
#[allow(
clippy::useless_conversion,
clippy::unnecessary_fallible_conversions
)]
fn dev_from_path(path: &Path) -> Result<(dev_t, dev_t)> {
#[cfg(target_family = "unix")]
use std::os::unix::fs::MetadataExt;

View File

@@ -57,7 +57,11 @@ pub fn format(ts: SystemTime, str: &str) -> String {
}
#[must_use]
#[allow(clippy::as_conversions, clippy::cast_possible_truncation, clippy::cast_sign_loss)]
#[allow(
clippy::as_conversions,
clippy::cast_possible_truncation,
clippy::cast_sign_loss
)]
pub fn pretty(d: Duration) -> String {
use Unit::*;