File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ declare_clippy_lint! {
17
17
/// Wrapping a type in Arc doesn't add thread safety to the underlying data, so data races
18
18
/// could occur when touching the underlying data.
19
19
///
20
- /// ### Example.
20
+ /// ### Example
21
21
/// ```rust
22
- /// use std::cell::RefCell;
23
- /// use std::sync::Arc;
22
+ /// # use std::cell::RefCell;
23
+ /// # use std::sync::Arc;
24
24
///
25
25
/// fn main() {
26
26
/// // This is safe, as `i32` implements `Send` and `Sync`.
@@ -30,7 +30,6 @@ declare_clippy_lint! {
30
30
/// let b = Arc::new(RefCell::new(42));
31
31
/// }
32
32
/// ```
33
- /// ```
34
33
#[ clippy:: version = "1.72.0" ]
35
34
pub ARC_WITH_NON_SEND_SYNC ,
36
35
correctness,
@@ -63,7 +62,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync {
63
62
"usage of `Arc<T>` where `T` is not `Send` or `Sync`" ,
64
63
None ,
65
64
"consider using `Rc<T>` instead or wrapping `T` in a std::sync type like \
66
- Mutex<T>",
65
+ ` Mutex<T>` ",
67
66
) ;
68
67
}
69
68
}
You can’t perform that action at this time.
0 commit comments