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:
@@ -183,7 +183,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
visitor.visit_seq(self)
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, visitor))
|
||||
)]
|
||||
fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value>
|
||||
where
|
||||
V: Visitor<'de>,
|
||||
@@ -192,7 +195,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
visitor.visit_seq(self)
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, visitor))
|
||||
)]
|
||||
fn deserialize_tuple_struct<V>(
|
||||
self,
|
||||
_name: &'static str,
|
||||
@@ -216,7 +222,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
d.deserialize_map(visitor).map_err(Into::into)
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, visitor))
|
||||
)]
|
||||
fn deserialize_struct<V>(
|
||||
self,
|
||||
name: &'static str,
|
||||
@@ -232,7 +241,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, visitor))
|
||||
)]
|
||||
fn deserialize_unit_struct<V>(self, name: &'static str, visitor: V) -> Result<V::Value>
|
||||
where
|
||||
V: Visitor<'de>,
|
||||
@@ -246,7 +258,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
visitor.visit_unit()
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, visitor))
|
||||
)]
|
||||
fn deserialize_newtype_struct<V>(self, name: &'static str, visitor: V) -> Result<V::Value>
|
||||
where
|
||||
V: Visitor<'de>,
|
||||
@@ -261,7 +276,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, _visitor)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, _visitor))
|
||||
)]
|
||||
fn deserialize_enum<V>(
|
||||
self,
|
||||
_name: &'static str,
|
||||
@@ -436,7 +454,10 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
||||
impl<'a, 'de: 'a> de::SeqAccess<'de> for &'a mut Deserializer<'de> {
|
||||
type Error = Error;
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, seed)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, seed))
|
||||
)]
|
||||
fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
|
||||
where
|
||||
T: DeserializeSeed<'de>,
|
||||
@@ -455,7 +476,10 @@ impl<'a, 'de: 'a> de::SeqAccess<'de> for &'a mut Deserializer<'de> {
|
||||
impl<'a, 'de: 'a> de::MapAccess<'de> for &'a mut Deserializer<'de> {
|
||||
type Error = Error;
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, seed)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, seed))
|
||||
)]
|
||||
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>>
|
||||
where
|
||||
K: DeserializeSeed<'de>,
|
||||
@@ -463,7 +487,10 @@ impl<'a, 'de: 'a> de::MapAccess<'de> for &'a mut Deserializer<'de> {
|
||||
seed.deserialize(&mut **self).map(Some)
|
||||
}
|
||||
|
||||
#[cfg_attr(unabridged, tracing::instrument(level = "trace", skip(self, seed)))]
|
||||
#[cfg_attr(
|
||||
unabridged,
|
||||
tracing::instrument(level = "trace", skip(self, seed))
|
||||
)]
|
||||
fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value>
|
||||
where
|
||||
V: DeserializeSeed<'de>,
|
||||
|
||||
@@ -124,7 +124,12 @@ impl Engine {
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[tracing::instrument(name = "sequence", level = "debug", skip_all, fields(sequence))]
|
||||
#[tracing::instrument(
|
||||
name = "sequence",
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(sequence)
|
||||
)]
|
||||
pub fn current_sequence(&self) -> u64 {
|
||||
let sequence = self.db.latest_sequence_number();
|
||||
|
||||
|
||||
@@ -268,7 +268,11 @@ pub(crate) fn cache_size(config: &Config, base_size: u32, entity_size: usize) ->
|
||||
cache_size_f64(config, f64::from(base_size), entity_size)
|
||||
}
|
||||
|
||||
#[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(crate) fn cache_size_f64(config: &Config, base_size: f64, entity_size: usize) -> usize {
|
||||
let ents = base_size * config.cache_capacity_modifier;
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ use crate::{
|
||||
};
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(debug_assertions, should_panic(expected = "serializing string at the top-level"))]
|
||||
#[cfg_attr(
|
||||
debug_assertions,
|
||||
should_panic(expected = "serializing string at the top-level")
|
||||
)]
|
||||
fn ser_str() {
|
||||
let user_id: &UserId = "@user:example.com".try_into().unwrap();
|
||||
let s = serialize_to_vec(&user_id).expect("failed to serialize user_id");
|
||||
@@ -162,7 +165,10 @@ fn ser_json_macro() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(debug_assertions, should_panic(expected = "serializing string at the top-level"))]
|
||||
#[cfg_attr(
|
||||
debug_assertions,
|
||||
should_panic(expected = "serializing string at the top-level")
|
||||
)]
|
||||
fn ser_json_raw() {
|
||||
use tuwunel_core::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
@@ -179,7 +185,10 @@ fn ser_json_raw() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(debug_assertions, should_panic(expected = "you can skip serialization instead"))]
|
||||
#[cfg_attr(
|
||||
debug_assertions,
|
||||
should_panic(expected = "you can skip serialization instead")
|
||||
)]
|
||||
fn ser_json_raw_json() {
|
||||
use tuwunel_core::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user