use darkredis::ConnectionPool;
#[cfg_attr(feature = "runtime_tokio", tokio::main)]
#[cfg_attr(feature = "runtime_async_std", async_std::main)]
async fn main() -> darkredis::Result<()> {
let pool = ConnectionPool::create("127.0.0.1:6379".into(), None, num_cpus::get()).await?;
let mut conn = pool.get().await;
conn.set("secret_entrance", b"behind the bookshelf").await?;
let secret_entrance = conn.get("secret_entrance").await?;
assert_eq!(secret_entrance, Some("behind the bookshelf".into()));
conn.del("secret_entrance").await?;
Ok(())
}