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

@@ -179,7 +179,11 @@ fn base(config: &Config) -> Result<reqwest::ClientBuilder> {
}
}
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
#[cfg(any(
target_os = "android",
target_os = "fuchsia",
target_os = "linux"
))]
fn builder_interface(
builder: reqwest::ClientBuilder,
config: Option<&str>,
@@ -191,7 +195,11 @@ fn builder_interface(
}
}
#[cfg(not(any(target_os = "android", target_os = "fuchsia", target_os = "linux")))]
#[cfg(not(any(
target_os = "android",
target_os = "fuchsia",
target_os = "linux"
)))]
fn builder_interface(
builder: reqwest::ClientBuilder,
config: Option<&str>,

View File

@@ -16,17 +16,35 @@ use super::Service;
#[derive(Serialize, Default)]
pub struct UrlPreviewData {
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "og:title"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "og:title")
)]
pub title: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "og:description"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "og:description")
)]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "og:image"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "og:image")
)]
pub image: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "matrix:image:size"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "matrix:image:size")
)]
pub image_size: Option<usize>,
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "og:image:width"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "og:image:width")
)]
pub image_width: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none", rename(serialize = "og:image:height"))]
#[serde(
skip_serializing_if = "Option::is_none",
rename(serialize = "og:image:height")
)]
pub image_height: Option<u32>,
}

View File

@@ -22,7 +22,11 @@ pub(crate) struct Hooked {
type ResolvingResult = Result<Addrs, Box<dyn std::error::Error + Send + Sync>>;
impl Resolver {
#[allow(clippy::as_conversions, clippy::cast_sign_loss, clippy::cast_possible_truncation)]
#[allow(
clippy::as_conversions,
clippy::cast_sign_loss,
clippy::cast_possible_truncation
)]
pub(super) fn build(server: &Arc<Server>, cache: Arc<Cache>) -> Result<Arc<Self>> {
let config = &server.config;
let (sys_conf, mut opts) = hickory_resolver::system_conf::read_system_conf()

View File

@@ -31,7 +31,11 @@ type NameBuf = ArrayString<256>;
#[async_trait]
impl crate::Service for Service {
#[allow(clippy::as_conversions, clippy::cast_sign_loss, clippy::cast_possible_truncation)]
#[allow(
clippy::as_conversions,
clippy::cast_sign_loss,
clippy::cast_possible_truncation
)]
fn build(args: crate::Args<'_>) -> Result<Arc<Self>> {
let cache = Cache::new(&args);
Ok(Arc::new(Self {

View File

@@ -519,7 +519,11 @@ impl Service {
}
/// Look for read receipts in this room
#[tracing::instrument(name = "receipts", level = "trace", skip(self, since, max_edu_count))]
#[tracing::instrument(
name = "receipts",
level = "trace",
skip(self, since, max_edu_count)
)]
async fn select_edus_receipts_room(
&self,
room_id: &RoomId,

View File

@@ -184,7 +184,10 @@ impl Service {
/// Returns an iterator over all users on this homeserver (offered for
/// compatibility)
#[allow(clippy::iter_without_into_iter, clippy::iter_not_returning_iterator)]
#[allow(
clippy::iter_without_into_iter,
clippy::iter_not_returning_iterator
)]
pub fn iter(&self) -> impl Stream<Item = OwnedUserId> + Send + '_ {
self.stream().map(ToOwned::to_owned)
}