Skip to content

Commit 5effc99

Browse files
committed
Auto merge of #6298 - JohnTitor:fix-example, r=llogiq
Fix `await_holding_refcell_ref` examples for clarify - Remove redundant `()` - Fix variable name changelog: none
2 parents 4aca13f + 1e4ce0f commit 5effc99

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/await_holding_invalid.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ declare_clippy_lint! {
6565
/// use std::cell::RefCell;
6666
///
6767
/// async fn foo(x: &RefCell<u32>) {
68-
/// let b = x.borrow_mut()();
69-
/// *ref += 1;
68+
/// let mut y = x.borrow_mut();
69+
/// *y += 1;
7070
/// bar.await;
7171
/// }
7272
/// ```
@@ -77,8 +77,8 @@ declare_clippy_lint! {
7777
///
7878
/// async fn foo(x: &RefCell<u32>) {
7979
/// {
80-
/// let b = x.borrow_mut();
81-
/// *ref += 1;
80+
/// let mut y = x.borrow_mut();
81+
/// *y += 1;
8282
/// }
8383
/// bar.await;
8484
/// }

0 commit comments

Comments
 (0)