From c13ffb565d54c9c368498fa70c09c089fd15dafa Mon Sep 17 00:00:00 2001 From: NoahSprenger Date: Wed, 2 Oct 2024 20:01:26 -0400 Subject: [PATCH] :( --- Cargo.toml | 2 +- messages-proc-macros-lib/src/lib.rs | 4 ++-- src/lib.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 71cb2e2..a1ff90d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,4 +27,4 @@ postcard = { version = "1.0.4", features = ["alloc"] } [features] default = ["mavlink/embedded-hal-02", "mavlink/uorocketry"] -std = ["mavlink/std", "mavlink/tcp", "mavlink/udp", "mavlink/direct-serial", "mavlink/serde", "dep:proptest", "dep:proptest-derive"] +std = ["chrono/std", "mavlink/std", "mavlink/tcp", "mavlink/udp", "mavlink/direct-serial", "mavlink/serde", "dep:proptest", "dep:proptest-derive"] diff --git a/messages-proc-macros-lib/src/lib.rs b/messages-proc-macros-lib/src/lib.rs index afd8eca..0189974 100644 --- a/messages-proc-macros-lib/src/lib.rs +++ b/messages-proc-macros-lib/src/lib.rs @@ -3,7 +3,7 @@ use quote::quote; /// Simple macro to easily add derives that are common for the messages crates. #[proc_macro_attribute] -pub fn common_derives(args: TokenStream, input: TokenStream) -> TokenStream { +pub fn common_derives(args: TokenStream, input: TokenStream) -> TokenStream { let mut output = TokenStream::from(quote! { #[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] #[cfg_attr(feature = "ts", derive(ts_rs::TS))] @@ -20,4 +20,4 @@ pub fn common_derives(args: TokenStream, input: TokenStream) -> TokenStream { output.extend(input); output -} +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 950c11b..05f0744 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ #![cfg_attr(all(not(feature = "std"), not(test)), no_std)] #![no_main] -//! # HYDRA Messages +//! # Messages //! //! This crate contains all the message definitions that will be used for inter-board communication //! and ground-station communication. @@ -29,7 +29,7 @@ pub use logging::{ErrorContext, Event, Log, LogLevel}; /// Topmost message. Encloses all the other possible messages, and is the only thing that should /// be sent over the wire. -#[common_derives("NoFormat")] +#[common_derives(NoFormat)] pub struct Message { pub timestamp: NaiveDateTime, @@ -60,7 +60,7 @@ impl Message { } } -#[cfg(all(test, feature = "std"))] +#[cfg(test)] mod test { use crate::{Message, MAX_SIZE}; use proptest::prelude::*;