Skip to content

Commit

Permalink
Fix .first() usage
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
  • Loading branch information
zhiburt committed Feb 19, 2022
1 parent 26e51ac commit 70c91d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/session/sync_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl<P, S: Read + NonBlocking> Session<P, S> {
/// // wait to guarantee that check will successed (most likely)
/// std::thread::sleep(std::time::Duration::from_secs(1));
/// let m = p.check(expectrl::Regex("\\d+")).unwrap();
/// assert_eq!(m.first(), b"123");
/// assert_eq!(m.matches()[0], b"123");
/// ```
pub fn check<E: Needle>(&mut self, needle: E) -> Result<Found, Error> {
let eof = self.stream.read_available()?;
Expand Down

0 comments on commit 70c91d2

Please sign in to comment.