Skip to content

Commit

Permalink
Update doc comments to use lifetime 'async_trait instead of 'async
Browse files Browse the repository at this point in the history
  • Loading branch information
erer1243 committed Jul 5, 2023
1 parent f8ce3fb commit 92acf81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@
//! # Explanation
//!
//! Async fns get transformed into methods that return `Pin<Box<dyn Future +
//! Send + 'async>>` and delegate to a private async freestanding function.
//! Send + 'async_trait>>` and delegate to a private async freestanding function.
//!
//! For example the `impl Advertisement for AutoplayingVideo` above would be
//! expanded as:
//!
//! ```
//! # const IGNORE: &str = stringify! {
//! impl Advertisement for AutoplayingVideo {
//! fn run<'async>(
//! &'async self,
//! ) -> Pin<Box<dyn core::future::Future<Output = ()> + Send + 'async>>
//! fn run<'async_trait>(
//! &'async_trait self,
//! ) -> Pin<Box<dyn core::future::Future<Output = ()> + Send + 'async_trait>>
//! where
//! Self: Sync + 'async,
//! Self: Sync + 'async_trait,
//! {
//! async fn run(_self: &AutoplayingVideo) {
//! /* the original method body */
Expand Down

0 comments on commit 92acf81

Please sign in to comment.