Skip to content

Commit

Permalink
doc: Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
GrayJack committed Nov 27, 2024
1 parent 1fd627a commit 6111dc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ impl<'data> JanetArray<'data> {
/// let mut s = array![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
/// let num = Janet::from(42);
/// let idx = s.binary_search(&num).unwrap_or_else(|x| x);
/// s.insert(idx as i32, num);
/// s.insert(idx, num);
/// assert_eq!(
/// s.as_ref(),
/// array![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55].as_ref()
Expand Down
2 changes: 1 addition & 1 deletion src/types/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ impl<'data> JanetTuple<'data> {
/// let num = Janet::from(42);
/// let idx = s.binary_search(&num).unwrap_or_else(|x| x);
/// let mut s = JanetArray::from(s);
/// s.insert(idx as i32, num);
/// s.insert(idx, num);
/// assert_eq!(
/// s.as_ref(),
/// tuple![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55].as_ref()
Expand Down

0 comments on commit 6111dc9

Please sign in to comment.