diff options
| author | Melody Horn <melody@boringcactus.com> | 2024-11-10 14:22:05 -0700 | 
|---|---|---|
| committer | Melody Horn <melody@boringcactus.com> | 2024-11-10 14:22:05 -0700 | 
| commit | 117c76f28bdad33d96d2ecbd410497d9cdee4ce9 (patch) | |
| tree | c1aa0bc18c1d101e905e401b8b6140517a4b28aa | |
| parent | 4aee801ec1c4ea42fa819ae3c87f3316f2d66ee5 (diff) | |
| download | makers-117c76f28bdad33d96d2ecbd410497d9cdee4ce9.tar.gz makers-117c76f28bdad33d96d2ecbd410497d9cdee4ce9.zip  | |
make MacroSet Debug
| -rw-r--r-- | src/makefile/macro.rs | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index d77557b..25f8627 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -3,6 +3,7 @@ use std::collections::HashMap;  use std::collections::HashSet;  use std::env;  use std::fmt; +use std::fmt::Formatter;  use std::rc::Rc;  use eyre::{bail, Result, WrapErr}; @@ -370,6 +371,21 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> {      }  } +impl fmt::Debug for Set<'_, '_> { +    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { +        let mut r#struct = f.debug_struct("Set"); +        r#struct.field("parent", &self.parent); +        r#struct.field("data", &self.data); +        r#struct.field("lookup_internal", &self.lookup_internal.map(|_| ())); +        #[cfg(feature = "full")] +        r#struct.field("to_eval", &self.to_eval); +        #[cfg(feature = "full")] +        r#struct.field("exported", &self.exported); +        r#struct.field("warnings", &self.warnings); +        r#struct.finish() +    } +} +  impl fmt::Display for Set<'_, '_> {      fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {          let pieces = self  |