diff --git a/relay-general/src/store/normalize/request.rs b/relay-general/src/store/normalize/request.rs index 66eccd666ff..25e76117a20 100644 --- a/relay-general/src/store/normalize/request.rs +++ b/relay-general/src/store/normalize/request.rs @@ -76,6 +76,7 @@ fn normalize_url(request: &mut Request) { }; } +#[allow(clippy::ptr_arg)] // normalize_method must be &mut String for `apply`. fn normalize_method(method: &mut String, meta: &mut Meta) -> ProcessingResult { method.make_ascii_uppercase(); @@ -86,6 +87,7 @@ fn normalize_method(method: &mut String, meta: &mut Meta) -> ProcessingResult { Ok(()) } + /// Decodes an urlencoded body. fn urlencoded_from_str(raw: &str) -> Option { // Binary strings would be decoded, but we know url-encoded bodies are ASCII. diff --git a/relay-general/src/store/schema.rs b/relay-general/src/store/schema.rs index 908956abf1e..35079f94ef8 100644 --- a/relay-general/src/store/schema.rs +++ b/relay-general/src/store/schema.rs @@ -85,7 +85,7 @@ where } fn verify_value_characters( - value: &mut String, + value: &mut str, meta: &mut Meta, state: &ProcessingState<'_>, ) -> ProcessingResult { diff --git a/relay-server/src/utils/rate_limits.rs b/relay-server/src/utils/rate_limits.rs index 55c08e0de4a..e35025060ac 100644 --- a/relay-server/src/utils/rate_limits.rs +++ b/relay-server/src/utils/rate_limits.rs @@ -365,7 +365,7 @@ where let mut enforcement = Enforcement::default(); if let Some(category) = summary.event_category { - let event_limits = (&mut self.check)(scoping.item(category), 1)?; + let event_limits = (self.check)(scoping.item(category), 1)?; let longest = event_limits.longest(); enforcement.event = CategoryLimit::new(category, 1, longest); @@ -381,7 +381,7 @@ where if !enforcement.event.is_active() && summary.attachment_quantity > 0 { let item_scoping = scoping.item(DataCategory::Attachment); - let attachment_limits = (&mut self.check)(item_scoping, summary.attachment_quantity)?; + let attachment_limits = (self.check)(item_scoping, summary.attachment_quantity)?; enforcement.attachments = CategoryLimit::new( DataCategory::Attachment, summary.attachment_quantity, @@ -398,7 +398,7 @@ where if summary.session_quantity > 0 { let item_scoping = scoping.item(DataCategory::Session); - let session_limits = (&mut self.check)(item_scoping, summary.session_quantity)?; + let session_limits = (self.check)(item_scoping, summary.session_quantity)?; enforcement.sessions = CategoryLimit::new( DataCategory::Session, summary.session_quantity,