diff options
| author | mat <git@matdoes.dev> | 2025-06-16 05:50:06 +0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-16 05:50:06 +0500 |
| commit | 8f70f191bb790def5d274123b0b2521db602c004 (patch) | |
| tree | fff3624976f4225ce46ba778b531ae816405ce3e /azalea-chat/src | |
| parent | 318d95491c1d13c1fe0453914b1ab3e84b08ba4d (diff) | |
| download | azalea-drasl-8f70f191bb790def5d274123b0b2521db602c004.tar.xz | |
fix unused import warnings when compiling some crates individually
Diffstat (limited to 'azalea-chat/src')
| -rw-r--r-- | azalea-chat/src/component.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index c04aac4e..817d00b3 100644 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -1,6 +1,7 @@ +#[cfg(all(feature = "azalea-buf", feature = "simdnbt"))] +use std::io::{self, Cursor, Write}; use std::{ fmt::{self, Display}, - io::{self, Cursor, Write}, sync::LazyLock, }; @@ -9,6 +10,7 @@ use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use serde::{Deserialize, Deserializer, Serialize, de}; #[cfg(feature = "simdnbt")] use simdnbt::{Deserialize as _, FromNbtTag as _, Serialize as _}; +#[cfg(all(feature = "azalea-buf", feature = "simdnbt"))] use tracing::{debug, trace, warn}; use crate::{ @@ -546,8 +548,7 @@ impl From<&simdnbt::Mutf8Str> for FormattedText { } } -#[cfg(feature = "azalea-buf")] -#[cfg(feature = "simdnbt")] +#[cfg(all(feature = "azalea-buf", feature = "simdnbt"))] impl AzaleaRead for FormattedText { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { let nbt = simdnbt::borrow::read_optional_tag(buf)?; @@ -560,8 +561,7 @@ impl AzaleaRead for FormattedText { } } -#[cfg(feature = "azalea-buf")] -#[cfg(feature = "simdnbt")] +#[cfg(all(feature = "azalea-buf", feature = "simdnbt"))] impl AzaleaWrite for FormattedText { fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { let mut out = Vec::new(); |
