Skip to content

Commit e80963b

Browse files
authored
chore(beta): Address lint errors for next stable (#2642)
Make sure the `beta` compiles so that we have smooth transition once beta becomes stable. Fixes following warning: ``` warning: `&` without an explicit lifetime name cannot be used here ```
1 parent c153f90 commit e80963b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

relay-event-normalization/src/normalize/user_agent.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<S: AsRef<str> + Default> RawUserAgentInfo<S> {
162162

163163
impl RawUserAgentInfo<String> {
164164
/// The name of the user agent HTTP header.
165-
pub const USER_AGENT: &str = "User-Agent";
165+
pub const USER_AGENT: &'static str = "User-Agent";
166166

167167
/// Converts to a borrowed `RawUserAgentInfo`.
168168
pub fn as_deref(&self) -> RawUserAgentInfo<&str> {
@@ -248,10 +248,10 @@ impl ClientHints<String> {
248248
///
249249
/// `Sec-CH-UA-Platform` is a low entropy hint. Unless blocked by a user agent permission
250250
/// policy, it is sent by default (without the server opting in by sending `Accept-CH`).
251-
pub const SEC_CH_UA_PLATFORM: &str = "SEC-CH-UA-Platform";
251+
pub const SEC_CH_UA_PLATFORM: &'static str = "SEC-CH-UA-Platform";
252252

253253
/// Provides the version of the operating system on which the user agent is running.
254-
pub const SEC_CH_UA_PLATFORM_VERSION: &str = "SEC-CH-UA-Platform-Version";
254+
pub const SEC_CH_UA_PLATFORM_VERSION: &'static str = "SEC-CH-UA-Platform-Version";
255255

256256
/// Provides the user agent's branding and significant version information.
257257
///
@@ -270,10 +270,10 @@ impl ClientHints<String> {
270270
///
271271
/// `Sec-CH-UA` is a low entropy hint. Unless blocked by a user agent permission policy, it is
272272
/// sent by default (without the server opting in by sending `Accept-CH`).
273-
pub const SEC_CH_UA: &str = "SEC-CH-UA";
273+
pub const SEC_CH_UA: &'static str = "SEC-CH-UA";
274274

275275
/// Indicates the device model on which the browser is running.
276-
pub const SEC_CH_UA_MODEL: &str = "SEC-CH-UA-Model";
276+
pub const SEC_CH_UA_MODEL: &'static str = "SEC-CH-UA-Model";
277277

278278
/// Returns an instance of `ClientHints` that borrows from the original data.
279279
pub fn as_deref(&self) -> ClientHints<&str> {

relay-server/src/extractors/forwarded_for.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use axum::http::HeaderMap;
99
pub struct ForwardedFor(String);
1010

1111
impl ForwardedFor {
12-
const FORWARDED_HEADER: &str = "X-Forwarded-For";
13-
const VERCEL_FORWARDED_HEADER: &str = "X-Vercel-Forwarded-For";
14-
const SENTRY_FORWARDED_HEADER: &str = "X-Sentry-Forwarded-For";
12+
const FORWARDED_HEADER: &'static str = "X-Forwarded-For";
13+
const VERCEL_FORWARDED_HEADER: &'static str = "X-Vercel-Forwarded-For";
14+
const SENTRY_FORWARDED_HEADER: &'static str = "X-Sentry-Forwarded-For";
1515

1616
/// We prefer the SENTRY_FORWARDED_HEADER over the standard header because our infrastructure
1717
/// puts the contents of the incoming FORWARDED_HEADER into SENTRY_FORWARDED_HEADER for security

0 commit comments

Comments
 (0)