Skip to content

Commit e7e386b

Browse files
committed
Enable to_pascal_case for Yaml
1 parent 4dfa882 commit e7e386b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/util.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::cmp::{min, Ordering};
33
use std::collections::HashMap;
44
use std::fmt::{Formatter, Result as FormatResult, Write};
55

6-
#[cfg(feature = "json")]
6+
#[cfg(any(feature = "json", feature = "yaml"))]
77
pub(crate) fn to_pascal_case<T: AsRef<str>>(text: T) -> String {
88
let mut chars = text.as_ref().chars();
99

@@ -167,12 +167,7 @@ fn recurse_children<T: ConfigurationRoot>(
167167

168168
formatter.write_char('\n')?;
169169

170-
recurse_children(
171-
root,
172-
&child.children(),
173-
formatter,
174-
&(indent.to_owned() + " "),
175-
)?;
170+
recurse_children(root, &child.children(), formatter, &(indent.to_owned() + " "))?;
176171
}
177172

178173
Ok(())

0 commit comments

Comments
 (0)