Skip to content

Commit

Permalink
sl-std: Fix doctests in sl_std::slice
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwuelker committed Sep 25, 2023
1 parent 6513063 commit f93dffc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sl-std/src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ pub trait SubsliceOffset {
/// Examples
///
/// ```
/// # use sl_std::slice::SubsliceOffset;
///
/// let string = "a\nb\nc";
/// let lines: Vec<&str> = string.lines().collect();
/// assert!(string.subslice_offset(lines[0]) == Some(0)); // &"a"
Expand Down

0 comments on commit f93dffc

Please sign in to comment.