diff --git a/relay-metrics/src/meta/redis.rs b/relay-metrics/src/meta/redis.rs index dcbc0a6993..60cda8d50f 100644 --- a/relay-metrics/src/meta/redis.rs +++ b/relay-metrics/src/meta/redis.rs @@ -57,7 +57,8 @@ impl RedisMetricMetaStore { let expire_at = meta.timestamp.as_secs() + self.expiry.as_secs(); pipe.cmd("EXPIREAT").arg(key).arg(expire_at).ignore(); } - pipe.query(&mut connection).map_err(RedisError::Redis)?; + pipe.query::<()>(&mut connection) + .map_err(RedisError::Redis)?; relay_statsd::metric!(counter(MetricCounters::MetaRedisUpdate) += redis_updates); diff --git a/relay-pii/src/attachments.rs b/relay-pii/src/attachments.rs index c98eb1e91c..b8bf70c1b1 100644 --- a/relay-pii/src/attachments.rs +++ b/relay-pii/src/attachments.rs @@ -473,7 +473,7 @@ impl<'a> PiiAttachmentsProcessor<'a> { /// Scrub a filepath, preserving the basename. pub fn scrub_utf8_filepath(&self, path: &mut str, state: &ProcessingState<'_>) -> bool { - if let Some(index) = path.rfind(|c| c == '/' || c == '\\') { + if let Some(index) = path.rfind(['/', '\\']) { let data = unsafe { &mut path.as_bytes_mut()[..index] }; self.scrub_bytes(data, state, ScrubEncodings::Utf8) } else { diff --git a/relay-pii/src/legacy.rs b/relay-pii/src/legacy.rs index 1fd0862514..f8301a8a76 100644 --- a/relay-pii/src/legacy.rs +++ b/relay-pii/src/legacy.rs @@ -73,12 +73,11 @@ impl DataScrubbingConfig { /// Like [`pii_config`](Self::pii_config) but without internal caching. #[inline] pub fn pii_config_uncached(&self) -> Result, PiiConfigError> { - convert::to_pii_config(self).map_err(|e| { + convert::to_pii_config(self).inspect_err(|e| { relay_log::error!( - error = &e as &dyn std::error::Error, + error = e as &dyn std::error::Error, "failed to convert datascrubbing config" ); - e }) } } diff --git a/relay-pii/src/processor.rs b/relay-pii/src/processor.rs index 26fac7787d..c1f6a1ffb1 100644 --- a/relay-pii/src/processor.rs +++ b/relay-pii/src/processor.rs @@ -174,7 +174,7 @@ impl<'a> Processor for PiiProcessor<'a> { // string. If we decide that we need to preserve anything other than suffixes all PII // tooltips/annotations are potentially wrong. - if let Some(index) = value.rfind(|c| c == '/' || c == '\\') { + if let Some(index) = value.rfind(['/', '\\']) { let basename = value.split_off(index); match self.process_string(value, meta, state) { Ok(()) => value.push_str(&basename), diff --git a/relay-sampling/src/redis_sampling.rs b/relay-sampling/src/redis_sampling.rs index d56c217dde..154c9a1b7b 100644 --- a/relay-sampling/src/redis_sampling.rs +++ b/relay-sampling/src/redis_sampling.rs @@ -43,6 +43,6 @@ pub fn set_redis_expiry( relay_redis::redis::cmd("EXPIRE") .arg(key.as_str()) .arg(expiry_time - now) - .query(redis_connection)?; + .query::<()>(redis_connection)?; Ok(()) } diff --git a/relay-server/src/services/processor/event.rs b/relay-server/src/services/processor/event.rs index 633824d5e5..54fec8d519 100644 --- a/relay-server/src/services/processor/event.rs +++ b/relay-server/src/services/processor/event.rs @@ -117,9 +117,8 @@ pub fn extract( })? } else if let Some(item) = nel_item { relay_log::trace!("processing nel report"); - event_from_nel_item(item, envelope.meta()).map_err(|error| { - relay_log::error!(error = &error as &dyn Error, "failed to extract NEL report"); - error + event_from_nel_item(item, envelope.meta()).inspect_err(|error| { + relay_log::error!(error = error as &dyn Error, "failed to extract NEL report"); })? } else if attachment_item.is_some() || breadcrumbs1.is_some() || breadcrumbs2.is_some() { relay_log::trace!("extracting attached event data");