mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Fix await_holding_refcell_ref
examples for clarify
This commit is contained in:
parent
b20d4c155d
commit
1e4ce0fcaa
@ -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…
Reference in New Issue
Block a user