Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions sentry-types/src/protocol/attachment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ use std::fmt;
use serde::Deserialize;

/// The different types an attachment can have.
#[derive(Debug, Clone, Eq, PartialEq, Deserialize)]
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Default)]
pub enum AttachmentType {
#[serde(rename = "event.attachment")]
/// (default) A standard attachment without special meaning.
#[default]
Attachment,
/// A minidump file that creates an error event and is symbolicated. The
/// file should start with the `MDMP` magic bytes.
Expand All @@ -28,12 +29,6 @@ pub enum AttachmentType {
Custom(String),
}

impl Default for AttachmentType {
fn default() -> Self {
Self::Attachment
}
}

impl AttachmentType {
/// Gets the string value Sentry expects for the attachment type.
pub fn as_str(&self) -> &str {
Expand Down
8 changes: 2 additions & 6 deletions sentry-types/src/protocol/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ use crate::utils::{ts_rfc3339, ts_rfc3339_opt};
/// The Status of a Release Health Session.
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
#[derive(Default)]
pub enum SessionStatus {
/// The session is healthy.
///
/// This does not necessarily indicate that the session is still active.
#[default]
Ok,
/// The session terminated normally.
Exited,
Expand All @@ -26,12 +28,6 @@ pub enum SessionStatus {
Abnormal,
}

impl Default for SessionStatus {
fn default() -> Self {
Self::Ok
}
}

/// An error used when parsing `SessionStatus`.
#[derive(Debug, Error)]
#[error("invalid session status")]
Expand Down
Loading