From 1d705c2259171e222bde330698846e364a7c26a9 Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Thu, 16 Apr 2020 20:58:20 -0400 Subject: [PATCH] make `Side` repr(u8) --- Cargo.toml | 2 +- src/crypto.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7ec1bfc..f924931 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "markets" -version = "0.3.0" +version = "0.3.1" authors = ["Jonathan Strong "] edition = "2018" description = "kind of like the http crate, except about tradeable markets" diff --git a/src/crypto.rs b/src/crypto.rs index eaa0990..5a811a6 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -39,10 +39,11 @@ macro_rules! t { /// which side of the transaction (buying or selling) /// a price/trade is /// +#[repr(u8)] #[derive(Debug, PartialEq, Clone, Copy, Eq, Serialize)] pub enum Side { - Bid, - Ask + Bid = 1, + Ask = 2, } impl TryFrom for Side {