Skip to content

Commit b484598

Browse files
authored
fix: Fix build with Rust 1.80 (#3866)
#skip-changelog
1 parent 1523351 commit b484598

File tree

13 files changed

+57
-36
lines changed

13 files changed

+57
-36
lines changed

Cargo.lock

Lines changed: 31 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

relay-base-schema/src/project.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Contains [`ProjectKey`] and [`ProjectId`] types and necessary traits implementations.
22
//!
33
//! - [`ProjectId`] is the unique identifier of a Sentry project. Currently, it is just a wrapper
4-
//! over `u64` and should be considered as implementations details, as it can change in the future.
4+
//! over `u64` and should be considered as implementations details, as it can change in the future.
55
//! - [`ProjectKey`] is a byte array (`[u8; 32]`) and represents a DSN to identify and authenticate
6-
//! a project at Sentry.
6+
//! a project at Sentry.
77
88
use std::error::Error;
99
use std::fmt;

relay-dynamic-config/src/global.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::{defaults, ErrorBoundary, MetricExtractionGroup, MetricExtractionGrou
1919
/// [`ProjectConfig`](crate::ProjectConfig)s small.
2020
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
2121
#[serde(default, rename_all = "camelCase")]
22-
#[cfg_attr(feature = "jsonschema", derive(JsonSchema))]
2322
pub struct GlobalConfig {
2423
/// Configuration for measurements normalization.
2524
#[serde(skip_serializing_if = "Option::is_none")]
@@ -106,7 +105,6 @@ fn is_err_or_empty(filters_config: &ErrorBoundary<GenericFiltersConfig>) -> bool
106105
/// All options passed down from Sentry to Relay.
107106
#[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq)]
108107
#[serde(default)]
109-
#[cfg_attr(feature = "jsonschema", derive(JsonSchema))]
110108
pub struct Options {
111109
/// List of platform names for which we allow using unsampled profiles for the purpose
112110
/// of improving profile (function) metrics
@@ -235,7 +233,6 @@ pub struct Options {
235233
/// Kill switch for controlling the cardinality limiter.
236234
#[derive(Default, Clone, Copy, Debug, Serialize, Deserialize, PartialEq)]
237235
#[serde(rename_all = "lowercase")]
238-
#[cfg_attr(feature = "jsonschema", derive(JsonSchema))]
239236
pub enum CardinalityLimiterMode {
240237
/// Cardinality limiter is enabled.
241238
#[default]
@@ -251,7 +248,6 @@ pub enum CardinalityLimiterMode {
251248

252249
/// Configuration container to control [`BucketEncoding`] per namespace.
253250
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq)]
254-
#[cfg_attr(feature = "jsonschema", derive(JsonSchema))]
255251
#[serde(default)]
256252
pub struct BucketEncodings {
257253
transactions: BucketEncoding,

relay-event-normalization/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ similar-asserts = { workspace = true }
4848
[features]
4949
default = ["mmap"]
5050
mmap = ["maxminddb/mmap"]
51+
serde = []

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ impl<'a> RawUserAgentInfo<&'a str> {
196196
///
197197
/// See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#user_agent_client_hints>
198198
#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq)]
199-
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
200199
pub struct ClientHints<S>
201200
where
202201
S: Default + AsRef<str>,

relay-event-schema/src/protocol/debugmeta.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ pub struct NativeDebugImage {
337337
/// Unique debug identifier of the image.
338338
///
339339
/// - `elf`: Debug identifier of the dynamic library or executable. If a code identifier is available, the debug identifier is the little-endian UUID representation of the first 16-bytes of that
340-
/// identifier. Spaces are inserted for readability, note the byte order of the first fields:
340+
/// identifier. Spaces are inserted for readability, note the byte order of the first fields:
341341
///
342342
/// ```text
343343
/// code id: f1c3bcc0 2798 65fe 3058 404b2831d9e6 4135386c
@@ -371,7 +371,7 @@ pub struct NativeDebugImage {
371371
/// The optional checksum of the debug companion file.
372372
///
373373
/// - `pe_dotnet`: This is the hash algorithm and hex-formatted checksum of the associated PDB file.
374-
/// This should have the format `$algorithm:$hash`, for example `SHA256:aabbccddeeff...`.
374+
/// This should have the format `$algorithm:$hash`, for example `SHA256:aabbccddeeff...`.
375375
///
376376
/// See: <https://github.com/dotnet/runtime/blob/main/docs/design/specs/PE-COFF.md#pdb-checksum-debug-directory-entry-type-19>
377377
pub debug_checksum: Annotated<String>,

relay-filter/src/config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,19 +272,19 @@ impl GenericFilterConfig {
272272
/// configs yielding the filters according to the principles below:
273273
///
274274
/// - Filters from project configs are evaluated before filters from global
275-
/// configs.
275+
/// configs.
276276
/// - No duplicates: once a filter is evaluated (yielded or skipped), no filter
277-
/// with the same id is evaluated again.
277+
/// with the same id is evaluated again.
278278
/// - Filters in project configs override filters from global configs, but the
279-
/// opposite is never the case.
279+
/// opposite is never the case.
280280
/// - A filter in the project config can be a flag, where only `is_enabled` is
281-
/// defined and `condition` is not. In that case:
281+
/// defined and `condition` is not. In that case:
282282
/// - If `is_enabled` is true, the filter with a matching ID from global
283-
/// configs is yielded without evaluating its `is_enabled`. Unless the filter
284-
/// in the global config also has an empty condition, in which case the filter
285-
/// is not yielded.
283+
/// configs is yielded without evaluating its `is_enabled`. Unless the filter
284+
/// in the global config also has an empty condition, in which case the filter
285+
/// is not yielded.
286286
/// - If `is_enabled` is false, no filters with the same IDs are returned,
287-
/// including matching filters from global configs.
287+
/// including matching filters from global configs.
288288
///
289289
/// # Examples
290290
///

relay-filter/src/generic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ pub(crate) fn should_filter<F: Getter>(
6767
/// If filters are compatible, an iterator over all filters is returned. This
6868
/// iterator yields filters according to the principles below:
6969
/// - Filters from project configs are evaluated before filters from global
70-
/// configs.
70+
/// configs.
7171
/// - No duplicates: once a filter is evaluated (yielded or skipped), no filter
72-
/// with the same id is evaluated again.
72+
/// with the same id is evaluated again.
7373
/// - If a filter with the same id exists in projects and global configs, both
74-
/// are merged and the filter is yielded. Values from the filter in the project
75-
/// config are prioritized.
74+
/// are merged and the filter is yielded. Values from the filter in the project
75+
/// config are prioritized.
7676
fn merge_generic_filters<'a>(
7777
project: &'a GenericFiltersConfig,
7878
global: Option<&'a GenericFiltersConfig>,

relay-server/src/extractors/forwarded_for.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl ForwardedFor {
3737
///
3838
/// First match wins in order:
3939
/// - [`Self::CLOUDFLARE_FORWARDED_HEADER`], highest priority since users may use Cloudflare
40-
/// infront of Vercel, it is generally the first layer.
40+
/// infront of Vercel, it is generally the first layer.
4141
/// - [`Self::VERCEL_FORWARDED_HEADER`]
4242
/// - [`Self::SENTRY_FORWARDED_HEADER`]
4343
/// - [`Self::FORWARDED_HEADER`].

relay-server/src/services/global_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl GlobalConfigService {
301301
/// This function checks two levels of results:
302302
/// 1. Whether the request to the upstream was successful.
303303
/// 2. If the request was successful, it then checks whether the returned
304-
/// global config is valid and contains the expected data.
304+
/// global config is valid and contains the expected data.
305305
fn handle_result(&mut self, result: UpstreamQueryResult) {
306306
match result {
307307
Ok(Ok(response)) => {

relay-server/src/services/project_cache.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl CheckEnvelope {
148148
/// next stage:
149149
///
150150
/// - If the envelope needs dynamic sampling, and the project state is not cached or out of the
151-
/// date, the envelopes is spooled and we continue when the state is fetched.
151+
/// date, the envelopes is spooled and we continue when the state is fetched.
152152
/// - Otherwise, the envelope is directly submitted to the [`EnvelopeProcessor`].
153153
///
154154
/// [`EnvelopeProcessor`]: crate::services::processor::EnvelopeProcessor
@@ -840,9 +840,9 @@ impl ProjectCacheBroker {
840840
///
841841
/// Few conditions are checked here:
842842
/// - If there is no dynamic sampling key and the project is already cached, we do straight to
843-
/// processing otherwise buffer the envelopes.
843+
/// processing otherwise buffer the envelopes.
844844
/// - If the dynamic sampling key is provided and if the root and sampling projects
845-
/// are cached - process the envelope, buffer otherwise.
845+
/// are cached - process the envelope, buffer otherwise.
846846
///
847847
/// This means if the caches are hot we always process all the incoming envelopes without any
848848
/// delay. But in case the project state cannot be fetched, we keep buffering till the state

relay-server/src/statsd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,9 @@ pub enum RelayCounters {
683683
/// - `has_parent` (only for event_type span): `false` if the span is the root of a trace.
684684
/// - `platform` (only for event_type span): The platform from which the span was spent.
685685
/// - `metric_type` (only for event_type metric): The metric type, counter, distribution,
686-
/// gauge or set.
686+
/// gauge or set.
687687
/// - `metric_encoding` (only for event_type metric): The encoding used for distribution and
688-
/// set metrics.
688+
/// set metrics.
689689
///
690690
/// The message types can be:
691691
///

relay-server/tests/snapshots/test_fixtures__event_schema.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ expression: "relay_event_schema::protocol::event_json_schema()"
25692569
]
25702570
},
25712571
"debug_checksum": {
2572-
"description": " The optional checksum of the debug companion file.\n\n - `pe_dotnet`: This is the hash algorithm and hex-formatted checksum of the associated PDB file.\n This should have the format `$algorithm:$hash`, for example `SHA256:aabbccddeeff...`.\n\n See: <https://github.com/dotnet/runtime/blob/main/docs/design/specs/PE-COFF.md#pdb-checksum-debug-directory-entry-type-19>",
2572+
"description": " The optional checksum of the debug companion file.\n\n - `pe_dotnet`: This is the hash algorithm and hex-formatted checksum of the associated PDB file.\n This should have the format `$algorithm:$hash`, for example `SHA256:aabbccddeeff...`.\n\n See: <https://github.com/dotnet/runtime/blob/main/docs/design/specs/PE-COFF.md#pdb-checksum-debug-directory-entry-type-19>",
25732573
"default": null,
25742574
"type": [
25752575
"string",
@@ -2589,7 +2589,7 @@ expression: "relay_event_schema::protocol::event_json_schema()"
25892589
]
25902590
},
25912591
"debug_id": {
2592-
"description": " Unique debug identifier of the image.\n\n - `elf`: Debug identifier of the dynamic library or executable. If a code identifier is available, the debug identifier is the little-endian UUID representation of the first 16-bytes of that\n identifier. Spaces are inserted for readability, note the byte order of the first fields:\n\n ```text\n code id: f1c3bcc0 2798 65fe 3058 404b2831d9e6 4135386c\n debug id: c0bcc3f1-9827-fe65-3058-404b2831d9e6\n ```\n\n If no code id is available, the debug id should be computed by XORing the first 4096 bytes of the `.text` section in 16-byte chunks, and representing it as a little-endian UUID (again swapping the byte order).\n\n - `pe`: `signature` and `age` of the PDB file. Both values can be read from the CodeView PDB70 debug information header in the PE. The value should be represented as little-endian UUID, with the age appended at the end. Note that the byte order of the UUID fields must be swapped (spaces inserted for readability):\n\n ```text\n signature: f1c3bcc0 2798 65fe 3058 404b2831d9e6\n age: 1\n debug_id: c0bcc3f1-9827-fe65-3058-404b2831d9e6-1\n ```\n\n - `macho`: Identifier of the dynamic library or executable. It is the value of the `LC_UUID` load command in the Mach header, formatted as UUID.",
2592+
"description": " Unique debug identifier of the image.\n\n - `elf`: Debug identifier of the dynamic library or executable. If a code identifier is available, the debug identifier is the little-endian UUID representation of the first 16-bytes of that\n identifier. Spaces are inserted for readability, note the byte order of the first fields:\n\n ```text\n code id: f1c3bcc0 2798 65fe 3058 404b2831d9e6 4135386c\n debug id: c0bcc3f1-9827-fe65-3058-404b2831d9e6\n ```\n\n If no code id is available, the debug id should be computed by XORing the first 4096 bytes of the `.text` section in 16-byte chunks, and representing it as a little-endian UUID (again swapping the byte order).\n\n - `pe`: `signature` and `age` of the PDB file. Both values can be read from the CodeView PDB70 debug information header in the PE. The value should be represented as little-endian UUID, with the age appended at the end. Note that the byte order of the UUID fields must be swapped (spaces inserted for readability):\n\n ```text\n signature: f1c3bcc0 2798 65fe 3058 404b2831d9e6\n age: 1\n debug_id: c0bcc3f1-9827-fe65-3058-404b2831d9e6-1\n ```\n\n - `macho`: Identifier of the dynamic library or executable. It is the value of the `LC_UUID` load command in the Mach header, formatted as UUID.",
25932593
"anyOf": [
25942594
{
25952595
"$ref": "#/definitions/DebugId"

0 commit comments

Comments
 (0)