Fix await_holding_refcell_ref examples for clarify
This commit is contained in:
parent
b20d4c155d
commit
1e4ce0fcaa
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
/// }
|
||||
/// ```
|
||||
|
|
@ -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;
|
||||
/// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue