diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-01-15 18:12:00 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-01-22 11:28:32 +0200 |
commit | e87a9335934a8e8317019e4ba13c8512be1dcb51 (patch) | |
tree | 348ce01fd141e744abf08fdb0aad8ad27cea09a3 | |
parent | 4a8f87b12aa73b17c88dae2a4a4ba16dd21947af (diff) | |
download | subplot-e87a9335934a8e8317019e4ba13c8512be1dcb51.tar.gz |
chore: compile YamlMetadata::new only for tests
YamlMetadata::new is only used in unit tests, so disable it when not
testing.
Sponsored-by: author
-rw-r--r-- | src/ast.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -253,6 +253,7 @@ pub struct YamlMetadata { } impl YamlMetadata { + #[cfg(test)] fn new(yaml_text: &str) -> Result<Self, Error> { trace!("Parsing YAML"); let meta: Self = serde_yaml::from_str(yaml_text)?; |