Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Apr 6, 2024
1 parent 234a227 commit 616ced3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
//! use futures_lite::stream;
//!
//! let v: Vec<_> = vec!["chashu", "nori"]
//! .into_co_stream()
//! .map(|msg| async move { format!("hello {msg}") })
//! .collect()
//! .await;
//! .into_co_stream()
//! .map(|msg| async move { format!("hello {msg}") })
//! .collect()
//! .await;
//!

Check failure on line 32 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build and test (ubuntu-latest, stable)

`await` is only allowed inside `async` functions and blocks
//! assert_eq!(v, &["hello chashu", "hello nori"]);
//! assert_eq!(v, &["hello chashu", "hello nori"]);
//! ```
//!
//! **Access stack data outside the futures' scope**
Expand All @@ -44,13 +44,13 @@
//! let mut num = 0;
//!
//! let a = async {
//! println!("hello from the first future");
//! dbg!(&container);
//! println!("hello from the first future");
//! dbg!(&container);
//! };
//!
//! let b = async {
//! println!("hello from the second future");
//! num += container[0] + container[2];
//! println!("hello from the second future");
//! num += container[0] + container[2];
//! };
//!
//! println!("hello from the main future");
Expand Down

0 comments on commit 616ced3

Please sign in to comment.