Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
alekspickle authored and nihohit committed Jun 25, 2024
1 parent 8148863 commit 950249c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 9 additions & 11 deletions redis/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2170,18 +2170,16 @@ impl PubSubCommands for Connection {
///
/// # Example
///
/// ```rust,no_run
/// use redis::{Commands, RedisResult, ScanOptions};
/// fn force_fetching_every_matching_key(
/// con: &mut redis::Connection,
/// pattern: Option<&str>,
/// cursor: Option<u64>,
/// count: Option<usize>,
/// ) -> RedisResult<Vec<usize>> {
/// ```rust
/// use redis::{Commands, RedisResult, ScanOptions, Iter};
/// fn force_fetching_every_matching_key<'a, T: redis::FromRedisValue>(
/// con: &'a mut redis::Connection,
/// pattern: &'a str,
/// count: usize,
/// ) -> RedisResult<Iter<'a, T>> {
/// let opts = ScanOptions::default()
/// .cursor(cursor.unwrap_or_default())
/// .pattern(pattern)
/// .count(count);
/// .with_pattern(pattern)
/// .with_count(count);
/// con.scan_options(opts)
/// }
/// ```
Expand Down
4 changes: 2 additions & 2 deletions redis/tests/test_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ mod basic_async {
use futures::{prelude::*, StreamExt};
use redis::{
aio::{ConnectionLike, MultiplexedConnection},
cmd, pipe, AsyncCommands, ConnectionInfo, ErrorKind, PushKind, RedisConnectionInfo,
RedisResult, ScanOptions, Value,
cmd, pipe, AsyncCommands, ConnectionInfo, ErrorKind, PushInfo, PushKind,
RedisConnectionInfo, RedisResult, ScanOptions, Value,
};
use tokio::{sync::mpsc::error::TryRecvError, time::timeout};

Expand Down

0 comments on commit 950249c

Please sign in to comment.