Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Derive Serialize for JournalEvent
Browse files Browse the repository at this point in the history
semver: chore
  • Loading branch information
Somfic committed Nov 10, 2024
1 parent da19b14 commit c36b494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modules/journal/models/journal_event.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::journal::JournalEventKind;
use serde::Serialize;

#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize)]
pub struct JournalEvent {
/// Indicates whether the event was fired from a change in the journal directory or whether
/// it's an event from a log file other than the current one.
Expand Down
3 changes: 2 additions & 1 deletion src/modules/journal/models/journal_event_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use crate::nav_route::NavRoute;
use crate::ship_locker::ShipLocker;
use crate::shipyard::Shipyard;
use crate::status::Status;
use serde::Serialize;

/// This event is fired from the [LiveJournalDirReader] when any change happens in the journal
/// directory and includes all the possible models that could have been updated.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Serialize)]
// The large enum variant is allowed here as this is usually allocated by the reader anyway and
// adding another box here wouldn't be that useful. Also even though it's large, it's not huge.
#[allow(clippy::large_enum_variant)]
Expand Down

0 comments on commit c36b494

Please sign in to comment.