From 93817ba92f90ac5bb126869aba4a3dfbfd390656 Mon Sep 17 00:00:00 2001 From: Danielle Hutzley Date: Sun, 26 Jun 2022 16:41:22 -0700 Subject: [PATCH] Actually compile without Bincode --- daedalus/src/minecraft.rs | 8 ++++---- daedalus/src/modded.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/daedalus/src/minecraft.rs b/daedalus/src/minecraft.rs index c86c39a25..478f69046 100644 --- a/daedalus/src/minecraft.rs +++ b/daedalus/src/minecraft.rs @@ -50,10 +50,10 @@ pub struct Version { /// A link to additional information about the version pub url: String, /// The latest time a file in this version was updated - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub time: DateTime, /// The time this version was released - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub release_time: DateTime, /// The SHA1 hash of the additional information about the version pub sha1: String, @@ -362,10 +362,10 @@ pub struct VersionInfo { /// The minimum version of the Minecraft Launcher that can run this version of the game pub minimum_launcher_version: u32, /// The time that the version was released - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub release_time: DateTime, /// The latest time a file in this version was updated - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub time: DateTime, #[serde(rename = "type")] /// The type of version diff --git a/daedalus/src/modded.rs b/daedalus/src/modded.rs index 4e51604ed..2e62c981e 100644 --- a/daedalus/src/modded.rs +++ b/daedalus/src/modded.rs @@ -35,10 +35,10 @@ pub struct PartialVersionInfo { /// The version ID this partial version inherits from pub inherits_from: String, /// The time that the version was released - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub release_time: DateTime, /// The latest time a file in this version was updated - #[bincode(with_serde)] + #[cfg_attr(feature = "bincode", bincode(with_serde))] pub time: DateTime, #[serde(skip_serializing_if = "Option::is_none")] /// The classpath to the main class to launch the game