diff options
| -rw-r--r-- | azalea-core/src/filterable.rs | 13 | ||||
| -rw-r--r-- | azalea-inventory/src/components/mod.rs | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/azalea-core/src/filterable.rs b/azalea-core/src/filterable.rs index 893ebc3e..fe9a553d 100644 --- a/azalea-core/src/filterable.rs +++ b/azalea-core/src/filterable.rs @@ -1,4 +1,7 @@ -use std::io::{self, Cursor, Write}; +use std::{ + fmt::Debug, + io::{self, Cursor, Write}, +}; use azalea_buf::{AzaleaRead, AzaleaReadLimited, AzaleaReadVar, AzaleaWrite}; use serde::Serialize; @@ -56,3 +59,11 @@ impl<T: PartialEq> PartialEq for Filterable<T> { self.raw == other.raw && self.filtered == other.filtered } } +impl<T: Debug> Debug for Filterable<T> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Filterable") + .field("raw", &self.raw) + .field("filtered", &self.filtered) + .finish() + } +} diff --git a/azalea-inventory/src/components/mod.rs b/azalea-inventory/src/components/mod.rs index 5661547a..7f3fa831 100644 --- a/azalea-inventory/src/components/mod.rs +++ b/azalea-inventory/src/components/mod.rs @@ -703,7 +703,7 @@ pub struct SuspiciousStewEffects { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct WritableBookContent { - pub pages: Vec<String>, + pub pages: Vec<Filterable<String>>, } #[derive(Clone, PartialEq, AzBuf, Serialize)] |
