Skip to content

Commit 02d4d7b

Browse files
committed
Document.
1 parent c3eedca commit 02d4d7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jaq-json/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl Val {
518518
}
519519
}
520520

521-
/// Return any `key` for which `value | .[key]` is defined.
521+
/// Return any `key` for which `value | .[key]` is defined, as well as its output.
522522
///
523523
/// Return `None` for values that are neither arrays nor objects.
524524
fn key_values(&self) -> Option<BoxIter<(Val, &Val)>> {
@@ -530,6 +530,7 @@ impl Val {
530530
})
531531
}
532532

533+
/// Return all path-value pairs `($p, $v)`, such that `getpath($p) = $v`.
533534
fn path_values<'a>(self, path: Vec<Val>) -> BoxIter<'a, (Val, Val)> {
534535
let head = (path.iter().cloned().collect(), self.clone());
535536
let f = move |k| path.iter().cloned().chain([k]).collect();

0 commit comments

Comments
 (0)