diff --git a/crates/toml_edit/src/inline_table.rs b/crates/toml_edit/src/inline_table.rs index 82b54906..0e125522 100644 --- a/crates/toml_edit/src/inline_table.rs +++ b/crates/toml_edit/src/inline_table.rs @@ -186,7 +186,7 @@ impl InlineTable { } /// Returns an accessor to a key's formatting - fn key(&mut self, key: &str) -> Option<&'_ Key> { + pub fn key(&mut self, key: &str) -> Option<&'_ Key> { self.items.get(key).map(|kv| &kv.key) } diff --git a/crates/toml_edit/src/table.rs b/crates/toml_edit/src/table.rs index 199d17ae..72a53343 100644 --- a/crates/toml_edit/src/table.rs +++ b/crates/toml_edit/src/table.rs @@ -219,7 +219,7 @@ impl Table { } /// Returns an accessor to a key's formatting - fn key(&mut self, key: &str) -> Option<&'_ Key> { + pub fn key(&mut self, key: &str) -> Option<&'_ Key> { self.items.get(key).map(|kv| &kv.key) }