Skip to content

Commit

Permalink
Auto merge of rust-lang#6298 - JohnTitor:fix-example, r=llogiq
Browse files Browse the repository at this point in the history
Fix `await_holding_refcell_ref` examples for clarify

- Remove redundant `()`
- Fix variable name

changelog: none
  • Loading branch information
bors committed Nov 7, 2020
2 parents 4aca13f + 1e4ce0f commit 5effc99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clippy_lints/src/await_holding_invalid.rs
Expand Up @@ -65,8 +65,8 @@ declare_clippy_lint! {
/// use std::cell::RefCell;
///
/// async fn foo(x: &RefCell<u32>) {
/// let b = x.borrow_mut()();
/// *ref += 1;
/// let mut y = x.borrow_mut();
/// *y += 1;
/// bar.await;
/// }
/// ```
Expand All @@ -77,8 +77,8 @@ declare_clippy_lint! {
///
/// async fn foo(x: &RefCell<u32>) {
/// {
/// let b = x.borrow_mut();
/// *ref += 1;
/// let mut y = x.borrow_mut();
/// *y += 1;
/// }
/// bar.await;
/// }
Expand Down

0 comments on commit 5effc99

Please sign in to comment.