Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnwa committed Sep 8, 2020
1 parent fa63b5b commit d722d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rwlock.rs
Expand Up @@ -43,7 +43,7 @@ impl<T> RwLock<T> {
/// #[tokio::main]
/// async fn main() {
/// let mutex = RwLock::new(10);
/// let guard = mutex.write().await;
/// let mut guard = mutex.write().await;
/// *guard += 1;
/// assert_eq!(*guard, 11);
/// }
Expand All @@ -70,7 +70,7 @@ impl<T> RwLock<T> {
/// #[tokio::main]
/// async fn main() {
/// let mutex = Arc::new(RwLock::new(10));
/// let guard = mutex.write_owned().await;
/// let mut guard = mutex.write_owned().await;
/// *guard += 1;
/// assert_eq!(*guard, 11);
/// }
Expand Down

0 comments on commit d722d39

Please sign in to comment.