summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 16c16ea..7d90ec4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -734,28 +734,6 @@ impl Configuration {
self.into_iter()
}
- /// Get the list of all “direct children” of `key` in this configuration.
- ///
- /// More specifically, this returns an iterator of all unique
- /// (*n*+1)th components of keys in `self` whose first *n* components
- /// are equal to `key` (where `key` has *n* components).
- ///
- /// (So if there were keys `sheep.age`, `sheep.colour`, and `sheep.age.unit`,
- /// `subkeys("sheep")` would give an iterator yielding
- /// `"age"` and `"colour"` in some order.)
- ///
- /// The order of items returned is arbitrary and may change
- /// in future versions without notice.
- pub fn subkeys(&self, key: &str) -> impl '_ + Iterator<Item = &str> {
- let key_dot = format!("{key}.");
- let start_idx = self.subkey_start_idx(key);
- (start_idx..self.items.len()).map_while(move |i| {
- let this_key = &self.items[i].0;
- let suffix = this_key.strip_prefix(&key_dot)?;
- Some(suffix.split_once('.').map_or(suffix, |(x, _)| x))
- })
- }
-
fn get_val(&self, key: &str) -> Option<&Value> {
let idx = self.binary_search_for(key).ok()?;
Some(&self.items[idx].1)