diff options
| author | Nemo157 <github@nemo157.com> | 2023-01-20 22:31:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-20 15:31:02 -0600 |
| commit | 1059afa6fcf8b2776fd25dac07ed2e76ab48bed3 (patch) | |
| tree | 8e5976e6d0a3baf4fdb87010f9ab5f0c375ecca6 /azalea-chat/src/style.rs | |
| parent | c6b566497220ce5801d21ee2149d6a4b273aa2d1 (diff) | |
| download | azalea-drasl-1059afa6fcf8b2776fd25dac07ed2e76ab48bed3.tar.xz | |
Allow using azalea-chat without azalea-buf to avoid unstable features (#58)
Diffstat (limited to 'azalea-chat/src/style.rs')
| -rwxr-xr-x | azalea-chat/src/style.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea-chat/src/style.rs b/azalea-chat/src/style.rs index ed800c71..4b424f31 100755 --- a/azalea-chat/src/style.rs +++ b/azalea-chat/src/style.rs @@ -1,5 +1,6 @@ use std::{collections::HashMap, fmt}; +#[cfg(feature = "azalea-buf")] use azalea_buf::McBuf; use once_cell::sync::Lazy; use serde::{ser::SerializeStruct, Serialize, Serializer}; @@ -86,7 +87,8 @@ impl Ansi { } } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, McBuf)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] +#[cfg_attr(feature = "azalea-buf", derive(McBuf))] pub enum ChatFormatting { Black, DarkBlue, |
