Skip to content

Commit

Permalink
clean up NodeList::get doc and use resolver 2 for workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
hiltontj committed Aug 29, 2023
1 parent 0059977 commit 8393ee2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"serde_json_path_macros",
"serde_json_path_macros/src/internal"
]
resolver = "2"

[profile.dev]
incremental = false
Expand Down
7 changes: 3 additions & 4 deletions serde_json_path_core/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ impl<'a> NodeList<'a> {
/// # fn main() -> Result<(), serde_json_path::ParseError> {
/// let value = json!({"foo": ["bar", "biz", "bop"]});
/// let path = JsonPath::parse("$.foo.*")?;
/// let node = path.query(&value).get(1);
/// assert_eq!(node, Some(&json!("biz")));
/// let node = path.query(&value).get(4);
/// assert!(node.is_none());
/// let nodes = path.query(&value);
/// assert_eq!(nodes.get(1), Some(&json!("biz")));
/// assert!(nodes.get(4).is_none());
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit 8393ee2

Please sign in to comment.