Skip to content

Commit

Permalink
Make RabbitEvent enum send as number instead of string (repr)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinrouillard committed Oct 19, 2024
1 parent fbaf1fe commit 0571a5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ futures-util = "0.3.30"
prometheus-http-query = "0.8.3"
influxdb2 = "0.5.1"
influxdb2-structmap = "0.2.0"
serde_repr = "0.1.19"

[profile.release]
lto = true
Expand Down
4 changes: 3 additions & 1 deletion src/connectivity/rabbit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ use lapin::{
};
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use serde_repr::{Deserialize_repr, Serialize_repr};

use crate::{
config::Config,
structs::{boosted::BoostedRideUpdate, spotify::CurrentPlaying},
};

#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Serialize_repr, Deserialize_repr, Clone, Debug)]
#[repr(u8)]
pub enum RabbitEvent {
SpotifyUpdate,
BoostedUpdate,
Expand Down

0 comments on commit 0571a5f

Please sign in to comment.